compomics / ms2rescore

Modular and user-friendly platform for AI-assisted rescoring of peptide identifications
https://ms2rescore.readthedocs.io
Apache License 2.0
39 stars 14 forks source link

Couldn't parse MaxQuant modifications in "Modified Sequence" column in CLI #90

Closed widmersimon closed 8 months ago

widmersimon commented 11 months ago

Hey there,

I am trying to run MS2Rescore from the command line with MaxQuant results (msms.txt).

"ms2pip": { "model": "Immuno-HCD", "frag_error": 0.02, "modifications": [ {"name":"Acetyl", "unimod_accession":1, "mass_shift":42.010565, "amino_acid":null, "n_term":true, "c_term": false}, {"name":"Carbamidomethyl", "unimod_accession":4, "mass_shift":57.021464, "amino_acid":"C", "n_term":false, "c_term": false}, {"name":"Oxidation", "unimod_accession":35, "mass_shift":15.994915, "amino_acid":"M", "n_term":false, "c_term": false} ] }, "maxquant_to_rescore": { "modification_mapping":{ "ox":"Oxidation", "ac":"Acetyl (Protein N-term)" }, "fixed_modifications":{ "C":"Carbamidomethyl" } }, "percolator": {} }

I believe there is an error with the parsing of the files, when I try to run the rescoring I get this:

2023-08-07 13:30:41 // INFO // ms2rescore // Using MaxQuantPipeline. 2023-08-07 13:31:14 // WARNING // ms2rescore.maxquant // Removed 105008 non-rank 1 PSMs. 2023-08-07 13:31:15 // WARNING // ms2rescore.maxquant // Removed 32 PSMs with invalid amino acids. 2023-08-07 13:31:18 // ERROR // ms2rescore.main // Critical error occured in MS2ReScore Traceback (most recent call last): File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/main.py", line 15, in main rescore.run() File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/init.py", line 233, in run peprec = self.pipeline.get_peprec() File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/id_file_parser.py", line 397, in get_peprec peprec = self.msms_df.msms.to_peprec( File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/maxquant.py", line 434, in to_peprec peprec["modifications"] = self.get_peprec_modifications( File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/maxquant.py", line 314, in get_peprec_modifications peprec_mods.append(self._get_single_peprec_modification( File "/opt/anaconda3/lib/python3.9/site-packages/ms2rescore/maxquant.py", line 250, in _get_single_peprec_modification mod_list = MSMSAccessor._find_mods_recursively( File "//opt/anaconda3/lib/python3.9/site-packages/ms2rescore/maxquant.py", line 225, in _find_mods_recursively raise ModificationParsingError( ms2rescore._exceptions.ModificationParsingError: Coud not match remaining modification labels in sequence (Acetyl (Protein N-term))AAAAAAAAAAGAAGGR. Ensure that all modifications are configured in the MaxQuant modification_mapping setting.

I saw that there was a bug fix in the gui version of the software and I hope that the error was made on my end.

Thanks a lot in advance!

RalfG commented 8 months ago

Hi @widmersimon,

Could you retry with MS²Rescore the latest beta version of MS²Rescore 3.0? You can install it with:

pip install ms2rescore --pre

or download the desktop app installer from https://github.com/compomics/ms2rescore/releases/latest.

Let us know if you do run into any issues!