Repository navigation
feat(diann): add --strip_unknown_mods to recover hydroxyproline / non-standard PTMs - #108
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
1de1952 to
aab409b
Compare
|
Reworked per design feedback: |
…-standard PTMs
Some declared variable modifications are not recognised by the DIA-NN
deep-learning predictor — most notably Oxidation on proline (hydroxyproline),
ubiquitous in collagen/ECM. During in-silico library generation DIA-NN
silently SKIPS those precursors (log: 'skipping N precursors, unrecognised
modifications'), so they never enter the library and are never identified.
Add a first-class boolean param 'strip_unknown_mods' (default false). It is
assembled into each DIA-NN module's command (like met_excision/aa_eq) rather
than injected via extra_args, matching the pipeline's design. When enabled,
--strip-unknown-mods is added to all DIA-NN steps, forcing DIA-NN to predict
spectra/RTs/IMs for the unrecognised-mod peptidoforms so they are retained
and searchable. No-op when every declared modification is recognised.
- nextflow.config + nextflow_schema.json: new strip_unknown_mods param.
- modules/local/diann/*: INSILICO_LIBRARY_GENERATION, PRELIMINARY_ANALYSIS,
ASSEMBLE_EMPIRICAL_LIBRARY, INDIVIDUAL_ANALYSIS, FINAL_QUANTIFICATION all
add ${strip_unknown_mods} to the diann command.
- docs/usage.md: GUI-flag mapping row + Common pitfalls note (incl. the
Trypsin/P enzyme for --cut K*,R*, declared in the SDRF, for collagen).
- CHANGELOG.
aab409b to
470282d
Compare
Problem
Some variable modifications declared in the SDRF are not built into the DIA-NN deep-learning predictor — most notably Oxidation on proline (hydroxyproline), which is ubiquitous in collagen/ECM samples. During in-silico library generation (
--fasta-search --predictor), DIA-NN silently skips those peptidoforms:Because the pipeline never passes
--strip-unknown-mods, those precursors never enter the predicted library and are never identified — even though they are correctly declared in the SDRF (NT=Oxidation;MT=Variable;TA=P;AC=UNIMOD:35). Methionine oxidation (which the predictor does know) comes through normally, so the loss is silent and PTM-specific.Evidence
On a collagen/ECM lung GPF dataset (DIA-NN 1.8.1), the in-silico step skipped ~10 M precursors (the hydroxyproline ones) and the final report contained 0 oxidized-proline precursors. Re-running the same data with
--strip-unknown-mods(matching a reference desktop DIA-NN GUI run that uses the flag): the in-silico step generated 13.97 M precursors with no skipping, and the analysis recovered 1,567 oxidized-proline precursors. This is also the DIA-NN author's documented remedy for modifications the predictor does not recognise in 1.8.x.Change
strip_unknown_mods(defaultfalse). When enabled,--strip-unknown-modsis prepended to every DIA-NN step (viaconf/modules/dia.config), forcing DIA-NN to predict spectra/RTs/IMs for the unrecognised-mod peptidoforms so they are retained and searchable. It is a no-op when every declared modification is already recognised by the predictor.nextflow_schema.json: parameter definition (with help text and the skip-warning explanation).docs/usage.md: a row in the "Where each GUI flag goes" mapping table and a "Common pitfalls" entry (how to spotskipping N precursors, unrecognised modificationsin theINSILICO_LIBRARY_GENERATIONlog).CHANGELOG.md.Notes
--strip-unknown-modsis not inBlockedFlags, so it passes throughext.argsunchanged.Trypsin/P(MS:1001313), whichsdrf-pipelinesmaps to--cut K*,R*(trypsin cleaves before proline). That is configured in the SDRF, not in this pipeline, and is documented in the same table.P(UniMod:35)count from the pipeline output once it completes.