Skip to content

Specifying Phospho S T Y modifications caused bugs #608

Closed

Description

@an-altosian

Description of the bug

Hi team,

Recently I have been exploring phospho data processing using quantms. I found that specifying phospho modifications caused bugs in quantms.

In short, there are three ways to specify phospho STY terms in quantms. None of them worked perfectly.

  1. If I specify "NT=Phospho;MT=variable;TA=S,T,Y;AC=UNIMOD:21" (separating S T, and Y by commas) in SDRF, as in this example, DIANNCFG will make the S, T, and Y as three separate modification terms, and later in SILICOLIBRARYGENERATION, as three --var-mod specifications to DIANN, all with the name 'Phospho'. This confuses DIANN and only the first term, the phospho S term, will be taken by DIANN because of the duplicated names. See this discussion.
  2. if I specify STY without comma in SDRF, as in this example, STY will be passed as a single term, and SILICOLIBRARYGENERATION will work as expected. However, DIANNCONVERT will raise an error saying "the value 'Phospho (STY)' was used but is not valid; Retrieving the modification failed. It is not available for the residue '' and term specificity 'none'."
  3. If I specify --var-mod UniMod:21,79.966331,STYdirectly in ext.args to the SILICOLIBRARYGENERATION module, quantms will not complain but as quantms will not know it is a phospho experiment, there might be some hidden unexpected behaviors, for example in DIANNCONVERT.

Given this behavior, how do you think we can fix this in quantms? Thank you in advance! I am looking forward to hearing back from you!

Best,
Dongze

Command used and terminal output

Relevant files

SILICOLIBRARYGENERATION DIANN command when STY are separated by comma:

diann --cut K*,R* --fixed-mod Carbamidomethyl,57.021464,C --var-mod Acetyl,42.010565,*n --var-mod Oxidation,15.994915,M --var-mod Phospho,79.966331,S --var-mod Phospho,79.966331,T --var-mod Phospho,79.966331,Y --fasta Human_uniprot.fasta --fasta-search --min-pr-mz 350 --max-pr-mz 1050 --min-fr-mz 200 --max-fr-mz 1800 --missed-cleavages 2 --min-pep-len 7 --max-pep-len 30 --min-pr-charge 1 --max-pr-charge 4 --var-mods 3 --threads 8 --predictor --verbose 3 --gen-spec-lib --met-excision --rt-profiling

SILICOLIBRARYGENERATION DIANN command when STY are NOT separated by comma:

diann --fasta Human_uniprot.fasta --fasta-search --fixed-mod Carbamidomethyl,57.021464,C --var-mod UniMod:1,42.010565,*n --var-mod UniMod:35,15.994915,M --var-mod UniMod:21,79.966331,STY --mass-acc 18 --mass-acc-ms1 5 --min-pr-mz 350 --max-pr-mz 1050 --min-fr-mz 200 --max-fr-mz 1800 --missed-cleavages 2 --min-pep-len 7 --max-pep-len 30 --min-pr-charge 2 --max-pr-charge 4 --var-mods 3 --threads 30 --predictor --verbose 3 --gen-spec-lib --met-excision 

DIANNCONVERT error when STY are NOT separated by comma:

2025-11-11 17:14:26,851 [mztab_mtd] - Constructing MTD sub-table...
const OpenMS::ResidueModification* OpenMS::ModificationsDB::searchModificationsFast(const OpenMS::String&, bool&, const OpenMS::String&, OpenMS::ResidueModification::TermSpecificity) constModification not found: Phospho (STY)
Traceback (most recent call last):
  File "/usr/local/bin/quantmsutilsc", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/local/lib/python3.13/site-packages/quantmsutils/quantmsutilsc.py", line 32, in main
    cli()
    ~~~^^
  File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/quantmsutils/diann/diann2mztab.py", line 188, in diann2mztab
    diann_directory.convert_to_mztab(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        report=report,
        ^^^^^^^^^^^^^^
    ...<4 lines>...
        out=mztab_out,
        ^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/quantmsutils/diann/diann2mztab.py", line 424, in convert_to_mztab
    mtd, database, ms_run_index = mztab_mtd(
                                  ~~~~~~~~~^
        index_ref, dia_params, str(self.fasta), charge, missed_cleavages, self.diann_version
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/quantmsutils/diann/diann2mztab.py", line 619, in mztab_mtd
    (fixed_mods, variable_mods, fix_flag, var_flag) = mtd_mod_info(
                                                      ~~~~~~~~~~~~^
        fixed_modifications, variable_modifications
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/quantmsutils/diann/diann2mztab.py", line 541, in mtd_mod_info
    mod_obj = mods_db.getModification(mod)
  File "pyopenms/_pyopenms_13.pyx", line 2834, in pyopenms._pyopenms_13.ModificationsDB.getModification
  File "pyopenms/_pyopenms_13.pyx", line 2781, in pyopenms._pyopenms_13.ModificationsDB._getModification_1
RuntimeError: the value 'Phospho (STY)' was used but is not valid; Retrieving the modification failed. It is not available for the residue '' and term specificity 'none'. 

System information

DIANN 1.8.1
quantms 1.5.0

Activity

  1. added
    bug
    on Nov 11, 2025
  2. jpfeuffer commented on Nov 12, 2025

    @jpfeuffer
    Collaborator

    Hi!

    This is indeed not well thought out.
    I would vote for specifying it comma-separated in the SDRF (1.), then the DIANN steps should take care of combining them again. This would need some small tweaks in the steps/scripts though. It probably cant be added via config files.

  3. daichengxin commented on Nov 24, 2025

    @daichengxin
    Collaborator
  4. ypriverol commented on Nov 28, 2025

    @ypriverol
    Contributor

    @an-altosian Can you try the dev branch? Please close this issue if is solved, we will be releasing soon when fixing other issues.

  5. ypriverol commented on Dec 4, 2025

    @ypriverol
    Contributor

    I will close this issue for now. If the problem happens again @an-altosian feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions