Skip to content

Commit f5205c3

Browse files
committed
Merge remote-tracking branch 'origin/dev' into feat/configurable-final-prot-inf
# Conflicts: # nextflow.config
2 parents 528f67a + a83b70e commit f5205c3

10 files changed

Lines changed: 43 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### `Added`
99

10+
- New `--strip_unknown_mods` parameter (default `false`) that adds `--strip-unknown-mods` to the DIA-NN steps. Some declared variable modifications are not built into the DIA-NN deep-learning predictor — for example **Oxidation on proline**. During in-silico library generation DIA-NN **silently skips** those precursors (logged as `skipping N precursors, unrecognised modifications`), so they never enter the library and are never identified. Enabling `--strip_unknown_mods` forces DIA-NN to predict spectra/RTs/IMs for them so they are retained and searchable; it is a no-op when every declared modification is already recognised. Documented under [Where each GUI flag goes](docs/usage.md) and [Common pitfalls](docs/usage.md).
1011
- DIA-NN **2.5.1** (academic) version profile `-profile diann_v2_5_1` (container `ghcr.io/bigbio/diann:2.5.1`).
1112
- **DIA-NN Enterprise (2.5.1) support** via `-profile diann_v2_5_1_enterprise` (container `ghcr.io/bigbio/diann-enterprise:2.5.1`). New `--enable_kb` flag adds the Enterprise Knowledge Base (`--kb`) to the first-pass search to boost identifications (mainly human data); it is gated to the Enterprise build and **on by default** under the `diann_v2_5_1_enterprise` profile (disable with `--enable_kb false`). New `--diann_license <file>` stages the Enterprise license key into each DIA-NN step as `--license`, with fallback to a key bundled next to the binary when unset. The license key is a per-user secret and is never committed or bundled into the shared image.
1213

1314
### `Changed`
1415

16+
- Removed the stale `diann_extra_args` references. The parameter was renamed to `extra_args`, but the documented worked example still used the old name — which is silently ignored, so flags such as `--smart-profiling`/`--peak-center` were dropped. The worked example now uses `extra_args`, and passing `diann_extra_args` is flagged by nf-schema parameter validation as unrecognised. Use `extra_args` (or, better, the dedicated parameters where they exist).
1517
- Documentation: clarified DIA-NN container licensing. Only DIA-NN 1.8.1 is publicly redistributable (pulled from BioContainers as the default); releases from 1.9 onward must be built locally from the [quantms-containers](https://github.com/bigbio/quantms-containers) recipes and tagged `ghcr.io/bigbio/diann:<version>` so the matching `-profile diann_v<version>` resolves them. Added the missing DIA-NN 2.5.0 row to the README support table.
1618
- QPX export now publishes the Parquet dataset files and the `.h5mu` MuData file directly under `results/qpx/`, removing the intermediate `qpx/qpx_output/` subfolder. The `bigbio/qpx` module emits the dataset as `qpx_output/*` files (bigbio/nf-modules#39) so `publishDir` can flatten them.
1719
- `--precursor_qvalue` default is now **version-aware**: unset resolves by `--diann_version` to `0.01` (1%) for DIA-NN < 2.5 and `0.05` (5%) for >= 2.5, matching DIA-NN's recommended precursor q-value. An explicit `--precursor_qvalue` always overrides and is never replaced by the version default. Applies to both the DIA-NN main report (`--qvalue`) and the MSstats input; the matrix thresholds (`--matrix_qvalue`, `--matrix_spec_q`) are unchanged.

conf/modules/dia.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
========================================================================================
33
DIA-NN module options — all DIA pipeline steps
44
========================================================================================
5-
Passes params.extra_args (formerly params.diann_extra_args) to each DIA-NN step via ext.args.
5+
Passes params.extra_args to each DIA-NN step via ext.args.
66
Blocked-flag validation is performed in each module's script block,
77
so it applies regardless of whether ext.args is overridden by the user.
88
----------------------------------------------------------------------------------------

docs/usage.md

Lines changed: 22 additions & 20 deletions
Large diffs are not rendered by default.

modules/local/diann/assemble_empirical_library/main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ process ASSEMBLE_EMPIRICAL_LIBRARY {
5151
scoring_mode = params.scoring_mode == 'proteoforms' ? '--proteoforms' :
5252
params.scoring_mode == 'peptidoforms' ? '--peptidoforms' : ''
5353
aa_eq = params.aa_eq ? '--aa-eq' : ''
54+
strip_unknown_mods = params.strip_unknown_mods ? "--strip-unknown-mods" : ""
5455
diann_tims_sum = params.tims_sum ? "--quant-tims-sum" : ""
5556
diann_im_window = params.im_window ? "--im-window $params.im_window" : ""
5657
diann_dda_flag = meta.acquisition_method == 'dda' ? "--dda" : ""
@@ -82,6 +83,7 @@ process ASSEMBLE_EMPIRICAL_LIBRARY {
8283
--gen-spec-lib \\
8384
${scoring_mode} \\
8485
${aa_eq} \\
86+
${strip_unknown_mods} \\
8587
${license_arg} \\
8688
${kb} \\
8789
${diann_tims_sum} \\

modules/local/diann/final_quantification/main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ process FINAL_QUANTIFICATION {
7272
scoring_mode = params.scoring_mode == 'proteoforms' ? '--proteoforms' :
7373
params.scoring_mode == 'peptidoforms' ? '--peptidoforms' : ''
7474
aa_eq = params.aa_eq ? '--aa-eq' : ''
75+
strip_unknown_mods = params.strip_unknown_mods ? "--strip-unknown-mods" : ""
7576
// Precursor q-value: explicit param wins, else auto by diann_version (<2.5 -> 0.01, >=2.5 -> 0.05)
7677
precursor_qvalue = VersionUtils.resolvePrecursorQvalue(params)
7778
// DIA-NN Enterprise license; falls back to a key next to the binary when no path is provided
@@ -114,6 +115,7 @@ process FINAL_QUANTIFICATION {
114115
${quantums_params} \\
115116
${scoring_mode} \\
116117
${aa_eq} \\
118+
${strip_unknown_mods} \\
117119
${diann_use_quant} \\
118120
${diann_dda_flag} \\
119121
${diann_export_quant} \\

modules/local/diann/individual_analysis/main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ process INDIVIDUAL_ANALYSIS {
7272
scoring_mode = params.scoring_mode == 'proteoforms' ? '--proteoforms' :
7373
params.scoring_mode == 'peptidoforms' ? '--peptidoforms' : ''
7474
aa_eq = params.aa_eq ? '--aa-eq' : ''
75+
strip_unknown_mods = params.strip_unknown_mods ? "--strip-unknown-mods" : ""
7576
diann_tims_sum = params.tims_sum ? "--quant-tims-sum" : ""
7677
diann_im_window = params.im_window ? "--im-window $params.im_window" : ""
7778
diann_dda_flag = meta.acquisition_method == 'dda' ? "--dda" : ""
@@ -122,6 +123,7 @@ process INDIVIDUAL_ANALYSIS {
122123
${max_fr_mz} \\
123124
${scoring_mode} \\
124125
${aa_eq} \\
126+
${strip_unknown_mods} \\
125127
${diann_tims_sum} \\
126128
${diann_im_window} \\
127129
${diann_dda_flag} \\

modules/local/diann/insilico_library_generation/main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ process INSILICO_LIBRARY_GENERATION {
4040
scoring_mode = params.scoring_mode == 'proteoforms' ? '--proteoforms' :
4141
params.scoring_mode == 'peptidoforms' ? '--peptidoforms' : ''
4242
aa_eq = params.aa_eq ? '--aa-eq' : ''
43+
strip_unknown_mods = params.strip_unknown_mods ? "--strip-unknown-mods" : ""
4344
diann_dda_flag = is_dda ? "--dda" : ""
4445
diann_light_models = params.light_models ? "--light-models" : ""
4546
// Fine-tuned model flags — only set when tuned model files are provided
@@ -72,6 +73,7 @@ process INSILICO_LIBRARY_GENERATION {
7273
--gen-spec-lib \\
7374
${scoring_mode} \\
7475
${aa_eq} \\
76+
${strip_unknown_mods} \\
7577
${license_arg} \\
7678
${diann_light_models} \\
7779
${tuned_tokens_flag} \\

modules/local/diann/preliminary_analysis/main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ process PRELIMINARY_ANALYSIS {
4343
scoring_mode = params.scoring_mode == 'proteoforms' ? '--proteoforms' :
4444
params.scoring_mode == 'peptidoforms' ? '--peptidoforms' : ''
4545
aa_eq = params.aa_eq ? '--aa-eq' : ''
46+
strip_unknown_mods = params.strip_unknown_mods ? "--strip-unknown-mods" : ""
4647

4748
// I am using here the ["key"] syntax, since the preprocessed meta makes
4849
// was evaluating to null when using the dot notation.
@@ -107,6 +108,7 @@ process PRELIMINARY_ANALYSIS {
107108
${max_fr_mz} \\
108109
${scoring_mode} \\
109110
${aa_eq} \\
111+
${strip_unknown_mods} \\
110112
${diann_tims_sum} \\
111113
${diann_im_window} \\
112114
--no-prot-inf \\

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ params {
6969
speclib = null
7070
extra_args = null
7171
diann_extra_args = null // DEPRECATED alias for extra_args; honoured (with a warning) for backwards compatibility
72+
strip_unknown_mods = false // add '--strip-unknown-mods': force DIA-NN to predict spectra/RTs/IMs for declared modifications its deep-learning predictor does not recognise (e.g. Oxidation on proline). Without it those precursors are silently skipped from the in-silico library and never identified. No-op when all declared modifications are recognised.
7273
scoring_mode = 'generic' // Scoring mode: 'generic' (default), 'proteoforms' (variant detection, >= 2.0), 'peptidoforms' (PTM analysis)
7374
aa_eq = false // add '--aa-eq': treat I&L, Q&E, N&D as equivalent during reannotation (essential for entrapment FDR benchmarks)
7475
dda = false // Fallback: explicitly enable DDA when SDRF lacks acquisition method (requires DIA-NN >= 2.3.2)

nextflow_schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,13 @@
548548
"fa_icon": "fas fa-filter",
549549
"hidden": true
550550
},
551+
"strip_unknown_mods": {
552+
"type": "boolean",
553+
"default": false,
554+
"description": "Add --strip-unknown-mods so DIA-NN predicts spectra/RTs/IMs for declared modifications its predictor does not recognise (e.g. Oxidation on proline). Without it those precursors are skipped from the in-silico library.",
555+
"fa_icon": "fas fa-prescription-bottle",
556+
"help_text": "Some declared variable modifications are not built into the DIA-NN deep-learning predictor (e.g. Oxidation on proline). During in-silico library generation DIA-NN silently skips those precursors (logged as 'skipping N precursors, unrecognised modifications') unless this is enabled, so they never enter the library and are never identified. No-op when all declared modifications are recognised by the predictor."
557+
},
551558
"extra_args": {
552559
"type": "string",
553560
"description": "Extra arguments appended to all DIA-NN steps. Flags incompatible with specific steps are automatically stripped with a warning.",

0 commit comments

Comments
 (0)