Skip to content

Commit be51218

Browse files
committed
Implement suggested changes
1 parent 46ca94f commit be51218

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

ms2rescore/config_parser.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ def _validate_processes(config: Dict) -> Dict:
8989

9090
def _validate_regular_expressions(config: Dict) -> Dict:
9191
"""Validate regular expressions in configuration."""
92-
for field in ["psm_id_pattern", "spectrum_id_pattern"]:
92+
for field in [
93+
"psm_id_pattern",
94+
"spectrum_id_pattern",
95+
"psm_id_rt_pattern",
96+
"psm_id_im_pattern",
97+
]:
9398
if config["ms2rescore"][field]:
9499

95100
# Check if valid regex

ms2rescore/parse_psms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def parse_psms(config: Dict, psm_list: Union[PSMList, None]) -> PSMList:
6262
)
6363
new_ids = [_match_psm_ids(old_id, pattern) for old_id in psm_list["spectrum_id"]]
6464

65-
# Validate that n unique IDs remains the same
65+
# Validate that the number of unique IDs remains the same
6666
if len(set(new_ids)) != len(set(psm_list["spectrum_id"])):
6767
example_old_id = psm_list["spectrum_id"][0]
6868
example_new_id = new_ids[0]

ms2rescore/parse_spectra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _get_precursor_values(
205205
if spectrum_id_pattern:
206206
precursors = _apply_spectrum_id_pattern(precursors, spectrum_id_pattern)
207207

208-
# Ensure all PSMs have a precursor values
208+
# Ensure all PSMs have precursor values
209209
for psm in psm_list_run:
210210
if psm.spectrum_id not in precursors:
211211
raise MS2RescoreConfigurationError(

0 commit comments

Comments
 (0)