Skip to content

Prepec modification error: Multiple modifications per site not supported in Peptide Record format. #108

@NicolasProvencher

Description

@NicolasProvencher

Hi,
I am trying to use ms2Rescore to rescore the output i get from a searchGUi / peptideshaker analysis
here is the log of ms2rescore in debug mode

Running DeepLC for PSMs from run (1/1): `586APMS_FLAG_alt1`...
Calibrating DeepLC...
Using 5135 PSMs for calibration
Multiple modifications per site not supported in Peptide Record format.
Traceback (most recent call last):
  File "ms2rescore\gui\function2ctk.py", line 301, in run
    self.fn(*self.fn_args, **self.fn_kwargs)
  File "ms2rescore\gui\app.py", line 637, in function
    rescore(configuration=config)
  File "ms2rescore\core.py", line 76, in rescore
    fgen.add_features(psm_list)
  File "ms2rescore\feature_generators\deeplc.py", line 163, in add_features
    seq_df=self._psm_list_to_deeplc_peprec(psm_list_calibration)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ms2rescore\feature_generators\deeplc.py", line 210, in _psm_list_to_deeplc_peprec
    peprec = peptide_record.to_dataframe(psm_list)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "psm_utils\io\peptide_record.py", line 505, in to_dataframe
    return pd.DataFrame([PeptideRecordWriter._psm_to_entry(psm) for psm in psm_list])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "psm_utils\io\peptide_record.py", line 505, in <listcomp>
    return pd.DataFrame([PeptideRecordWriter._psm_to_entry(psm) for psm in psm_list])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "psm_utils\io\peptide_record.py", line 285, in _psm_to_entry
    sequence, modifications, charge = proforma_to_peprec(psm.peptidoform)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "psm_utils\io\peptide_record.py", line 443, in proforma_to_peprec
    ms2pip_mods.append(_mod_to_ms2pip(mod, i + 1))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "psm_utils\io\peptide_record.py", line 433, in _mod_to_ms2pip
    raise InvalidPeprecModificationError(
psm_utils.io.peptide_record.InvalidPeprecModificationError: Multiple modifications per site not supported in Peptide Record format.

On searchGUI i used the thermofisherrawparser to parse my raw file, X!Tandem and MS-GF+ as search algorithms and used peptideshaker
In peptideshaker, i used the export->peptideshaker project as -> mzldentML to produce the mzid im using in ms2rescore (including protein sequences)

modification used are Carbomidomethyl of C as fixed, and Oxidation , Acetylation for variables

percolator was used but i dont think it got to its step

I parsed the peptides in the mzid file to make sure that for the same peptide, all the modification had a different location

here is a link to a google drive folder containing the mzid and mzml and the fasta i used
https://drive.google.com/drive/folders/1DUUn7fyeJR2rgIze2dQQ3r4ikcyfwiLI?usp=sharing

here is the line in the config.json file generated by ms2rescore

`{
    "$schema": "./config_schema.json",
    "ms2rescore": {
        "feature_generators": {
            "basic": {},
            "ms2pip": {
                "model": "HCD2021",
                "ms2_tolerance": 0.02
            },
            "deeplc": {
                "deeplc_retrain": false,
                "n_epochs": 20,
                "calibration_set_size": 0.15
            }
        },
        "rescoring_engine": {
            "percolator": {
                "write_weights": true,
                "write_txt": true,
                "write_flashlfq": false,
                "protein_kwargs": {}
            }
        },
        "config_file": null,
        "psm_file": [
            "C:/Users/pron2107/Desktop/mspipeline/test1/report/test1.mzid"
        ],
        "psm_file_type": "mzid",
        "psm_reader_kwargs": {},
        "spectrum_path": "C:/Users/pron2107/Desktop/mspipeline/test1/586APMS_FLAG_alt1.mzML",
        "output_path": "C:/Users/pron2107/Desktop/mspipeline/test1/ms2rescore/test1",
        "log_level": "info",
        "id_decoy_pattern": "_REVERSED",
        "psm_id_pattern": ".*scan=(\\d+)$",
        "spectrum_id_pattern": ".*scan=(\\d+)$",
        "lower_score_is_better": false,
        "modification_mapping": {
            "Oxidation": "U:Oxidation",
            "Acetyl": "U:Acetylation"
        },
        "fixed_modifications": {
            "U:Carbamidomethyl": [
                "C"
            ]
        },
        "processes": 12,
        "rename_to_usi": false,
        "fasta_file": "C:/Users/pron2107/Desktop/mspipeline/test1/human-openprot-2_0-refprots+altprots+isoforms-min_2_pep-uniprot2022_06_011_concatenated_target_decoy.fasta",
        "write_report": true
    }
}`

after all that i am wondering if I am doing anything wrong, with my settings

Thanks in advance

Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions