File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 11import logging
22import os
3- import re
43from glob import glob
54from pathlib import Path
65from typing import Optional , Union
76
87from ms2rescore .exceptions import MS2RescoreConfigurationError
8+ from ms2rescore_rs import is_supported_file_type
99
1010logger = logging .getLogger (__name__ )
1111
@@ -66,11 +66,9 @@ def infer_spectrum_path(
6666 )
6767
6868 # Match with file extension if not in resolved_path yet
69- if not _is_minitdf (resolved_path ) and not re .match (
70- r"\.mgf$|\.mzml$|\.d$" , resolved_path , flags = re .IGNORECASE
71- ):
69+ if not is_supported_file_type (resolved_path ) or not os .path .exists (resolved_path ):
7270 for filename in glob (resolved_path + "*" ):
73- if re . match ( r".*(\.mgf$|\.mzml$|\.d)" , filename , flags = re . IGNORECASE ):
71+ if is_supported_file_type ( filename ):
7472 resolved_path = filename
7573 break
7674 else :
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ dependencies = [
4242 " lxml>=4.5" ,
4343 " mokapot>=0.10" ,
4444 " ms2pip>=4.0.0" ,
45- " ms2rescore_rs>=0.3 .0" ,
45+ " ms2rescore_rs>=0.4 .0" ,
4646 " numpy>=1.25" ,
4747 " pandas>=1" ,
4848 " plotly>=5" ,
You can’t perform that action at this time.
0 commit comments