Skip to content

Met-loss+Acetyl parsing #588

Closed
Closed

Description

@Kevin-Brockers

Description of the bug

Hi all,

I think, I encounted a bug (pipeline version 1.6.0), related to modification parsing:

In my sdrf sample manifest, I define:

comment[modification parameters]
NT=Met-loss+Acetyl;AC=Unimod:766;MT=Variable;PP=Protein N-term;TA=M

The validation is fine but I get the following error from comet:

Command executed:

  CometAdapter \
      -in XXX.mzML \
      -out XXX.idXML \
      -threads 8 \
      -database "XXX.fasta" \
      -instrument high_res \
      -missed_cleavages 2 \
      -min_peptide_length 6 \
      -max_peptide_length 40 \
      -num_hits 1 \
      -num_enzyme_termini fully \
      -enzyme "Trypsin" \
      -isotope_error 0/1 \
      -precursor_charge 2:4 \
      -fixed_modifications 'Carbamidomethyl (C)' \
      -variable_modifications 'Acetyl (Protein N-term)' 'Met-loss+acetyl (Protein N-term M)' 'Met-loss (Protein N-term M)' 'Oxidation (M)' \
      -max_variable_mods_in_peptide 3 \
      -precursor_mass_tolerance 10.0 \
      -precursor_error_units ppm \
      -fragment_mass_tolerance 0.02 \
      -fragment_bin_offset 0.0 \
      -minimum_peaks 10 \
      -clip_nterm_methionine true \
      -PeptideIndexing:IL_equivalent \
      -PeptideIndexing:unmatched_action warn \
      -debug 0 \
      -force \
       \
      2>&1 | tee XXX.log

  cat <<-END_VERSIONS > versions.yml
  "BIGBIO_QUANTMS:QUANTMS:LFQ:ID:PEPTIDE_DATABASE_SEARCH:COMET":
      CometAdapter: $(CometAdapter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
      Comet: $(comet 2>&1 | grep -E "Comet version.*" | sed 's/ Comet version //g' | sed 's/"//g')
  END_VERSIONS

Command exit status:
  6

Command output:
  Invalid string parameter value 'Met-loss+acetyl (Protein N-term M)' for parameter 'variable_modifications' given!

I'm not sure why the Met-loss+Acetyl is parse to Met-loss+acetyl could you help me out?

Command used and terminal output

Relevant files

No response

System information

No response

Activity

  1. added
    bug
    on Oct 6, 2025
  2. ypriverol commented on Oct 28, 2025

    @ypriverol
    Contributor
  3. jpfeuffer commented on Oct 28, 2025

    @jpfeuffer
    Collaborator

    Exactly the same.

  4. jpfeuffer commented on Oct 28, 2025

    @jpfeuffer
    Collaborator

    In your SDRF parsing you are somehow converting to lower case. I dont know why.

  5. Kevin-Brockers commented on Nov 3, 2025

    @Kevin-Brockers
    Author

    Hi all,

    Small update:

    I tried to run quantms use the Unimod accession only and let openms retrieve the name from unimod but that also didn't work...


    I had a bit of time during the weekend and investigated what might have been the problem and I think I found it.
    The root cause is in: https://github.com/bigbio/sdrf-pipelines/blob/dev/sdrf_pipelines/openms/openms.py line 244.
    The name = name.capitalize() converts the `Met-loss+Acetyl' to 'Met-loss+acetyl'

    Digging into Unimods naming conventions: combinatorial modifications are 'titled' but just name = name.title() wouldn't work either. -> Met-Loss+Acetyl

    @jpfeuffer are you also maintaining sdrf_pipelines?
    I can open a PR, implement the handling for combinatorial mods there but then I'm not sure how to continue and who can update the container in quantms then.

    Cheers,
    Kevin

  6. ypriverol commented on Nov 3, 2025

    @ypriverol
    Contributor

    Yes, We also maintain that library, if you do a PR we can review and it and update quantms. I think the best way there is to check if that name exist in Unimod, try to get the right name from it. I case we get for example met-loss+acetyl -> Met-loss+Acetyl

  7. jpfeuffer commented on Nov 3, 2025

    @jpfeuffer
    Collaborator

    @ypriverol The problem is that you are storing all names in lower-case in your unimod dump parquet file.
    It would be very inefficient to do another lookup. It would be better if you just stored the ORIGINAL name in that parquet file.

  8. ypriverol commented on Nov 3, 2025

    @ypriverol
    Contributor

    Ok, the parquet is only used if we want to use cached, But agree, I can try for unimod to keep the original names.

  9. Kevin-Brockers commented on Nov 3, 2025

    @Kevin-Brockers
    Author

    Hi all,

    Now I'm a bit confused... checking the intermediate pipeline results, the process SDRF_PARSING emits ch_expdesign which contains the Met-loss+acetyl as VariableModifications which is the used in the process COMET that is currently breaking my pipeline. Or do I read the code wrong?

    Because process SDRF_PARSING currently does not parse Met-loss+acetyl correct, I assume any of the combinatorial modifications in UNIMOD.
    I opened a PR: https://github.com/bigbio/sdrf-pipelines/pull/240

  10. jpfeuffer commented on Nov 3, 2025

    @jpfeuffer
    Collaborator

    So, what I think is happening:

    • You specify mixed-case correctly in SDRF
    • SDRF_PARSING uses toLower() to compare with their lower-case column in their caching parquet "DB"
    • SDRF_PARSING uses capitalize and thinks it solves the problem and creates correct names again (BUG!)
    • CometAdapter receives Capitalized string and fails

    I am afraid that trying to reconstruct the original name from a toLowered string is prone to more errors so it urgently needs to be fixed in sdrf converters parquet cache probably by adding a column with the Original name and constructing a separate dict from lowercase name to original name for lookup..

  11. daichengxin commented on Nov 23, 2025

    @daichengxin
    Collaborator

    Fixed: bigbio/sdrf-pipelines#241

    We firstly search unimod database using accession or name. Raising error when don't find it. But we should find all unimod PTM. Becaused Unimod:766 accession used in your example. But our unimod database are all UNIMOD upper name. Therefore, I added upper to compare accession ID in this PR.

  12. ypriverol commented on Nov 27, 2025

    @ypriverol
    Contributor

    Hi @Kevin-Brockers, in the dev branch, we fixed the error. Can you take a look?

  13. Kevin-Brockers commented on Nov 27, 2025

    @Kevin-Brockers
    Author

    Hi @ypriverol, that is great! Thanks a lot for digging into it. I will start the run now and let you know how it goes.

  14. Kevin-Brockers commented on Nov 27, 2025

    @Kevin-Brockers
    Author

    Hi all,

    The pipeline just finished smoothly with the Met-loss+Acetyl modification! commit: 447d8f1

    Thanks again for looking into it and providing a quick fix.

    Cheers,
    Kevin

  15. ypriverol commented on Nov 27, 2025

    @ypriverol
    Contributor

    Happy to have you on board!!! Sorry for being a bit late, but we are just a few dev maintaining.

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