Repository navigation
feat(diann): protein inference defaults to DIA-NN standard; relaxed/no-prot-inf opt-in - #107
Conversation
…in_inference) FINAL_QUANTIFICATION hardcoded --no-prot-inf (#104). Make it a param: relaxed_protein_inference=false (default) -> --no-prot-inf (reuse empirical-library inference); true -> --relaxed-prot-inf (re-infer in final). Enables an A/B to test whether --no-prot-inf is what lifts 1.8.1 protein counts and erases the 1.8.1->2.5 run-specific protein advantage Vadim expects (+12%/+18%).
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 |
|
…o-prot-inf opt-in Per DIA-NN docs, --relaxed-prot-inf (FragPipe/Spectronaut-style grouping) and --no-prot-inf (reuse library inference) are both OPT-IN deviations from DIA-NN's default standard inference. The pipeline was forcing --relaxed-prot-inf (INDIVIDUAL_ANALYSIS) and --no-prot-inf (FINAL, #104) -- both non-default. Replace with two mutually-exclusive opt-in params (relaxed_prot_inf / no_prot_inf, default false) applied to INDIVIDUAL_ANALYSIS + FINAL_QUANTIFICATION. Default (both off) = DIA-NN standard inference -- what a typical user gets. Benchmarks opt into whichever inference a given comparison needs (Vadim's guidance). Supersedes the single relaxed_protein_inference toggle.
…l-prot-inf # Conflicts: # nextflow.config
…rgs) The dev merge conflict resolution wrongly kept diann_extra_args alongside strip_unknown_mods. diann_extra_args was removed on dev in favor of extra_args (7737952 'remove diann_ prefix', a2b8d48 'drop stale diann_extra_args references'). Remove it from nextflow.config + schema so the branch matches dev.
Remove --kb (preliminary/assemble/individual), QuantUMS (final), and protein-inference (individual) inline comments — they duplicate the enable_kb / quantums / quantums_sel_runs / relaxed_prot_inf / no_prot_inf parameter descriptions in nextflow.config + schema. Genuine logic comments (toList gotcha, mass-accuracy version behaviour, validation guards) kept.
Address CodeRabbit review of #107: the usage.md flag table claimed --relaxed-prot-inf is 'Always set' (now stale -- it's opt-in via relaxed_prot_inf, default = DIA-NN standard inference), and the CHANGELOG only documented strip_unknown_mods. Update the row and add a CHANGELOG entry for the new protein-inference params.
- usage.md: add a 'Protein inference' section — DIA-NN default is heuristic inference (no flag); relaxed_prot_inf/no_prot_inf are mutually-exclusive opt-ins on INDIVIDUAL + FINAL; PRELIMINARY is fixed --no-prot-inf (calibration); INSILICO/ASSEMBLE do none. - BlockedFlags: refresh the INDIVIDUAL/FINAL comments (protein inference is now managed by the relaxed_prot_inf/no_prot_inf params, not hardcoded), and also block --relaxed-prot-inf in PRELIMINARY so extra_args can't add inference to the calibration pass.
…-liners The detailed explanation lives in usage.md; keep the code comments terse.
Cite DIA-NN discussions: default = heuristic inference, on by default (#680); --relaxed-prot-inf worked example A;B vs A (#107); 'keep defaults' guidance (#316). Clarify that --no-prot-inf is a deliberate deviation, not a DIA-NN documented default.
Re-pad the GUI-flag table (widened by the relaxed-prot-inf row) and switch emphasis to _italic_, per prettier@3.8.3 / .prettierrc.yml.
Summary
Makes DIA-NN protein inference configurable and aligns the pipeline default with DIA-NN's documented default. Two mutually-exclusive, opt-in parameters (
relaxed_prot_inf,no_prot_inf) now control protein inference on the report-producing second-pass steps; by default the pipeline passes no inference flag, i.e. DIA-NN's standard heuristic inference.Why — the problem this fixes
Protein-inference flags were hardcoded and had drifted into an inconsistent state:
main(stable)dev(after #104)--relaxed-prot-inf--relaxed-prot-inf--relaxed-prot-inf--no-prot-infmainapplied--relaxed-prot-infto both second-pass steps; #104 switched only FINAL to--no-prot-infand left INDIVIDUAL untouched. Sodevnow re-infers per file but reuses the library at the report step — and neither value is DIA-NN's default.What DIA-NN actually documents
--relaxed-prot-inf= FragPipe/Spectronaut-style grouping. DIA-NN's own example (#107): if X∈{A,B}, Y∈{B,C}, Z∈{A,C}, the default reportsA;B/B;C/A;C, while relaxed reportsA/C/C(each shared peptide assigned to one group).--no-prot-inf= disable inference, keep the library's protein groups. Not in DIA-NN's documented defaults; it is the maintainer's benchmark-specific advice (reuse the empirical-library grouping at the second pass).What this PR does
false), applied to INDIVIDUAL_ANALYSIS + FINAL_QUANTIFICATION:relaxed_prot_inf=true→--relaxed-prot-infno_prot_inf=true→--no-prot-inffalse(default) → no flag → DIA-NN standard heuristic inference--relaxed-prot-inf(INDIVIDUAL) and--no-prot-inf(FINAL), fixing themain/devinconsistency above.PRELIMINARY_ANALYSISkeeps its own--no-prot-inf(mass-accuracy calibration pass — no inference; unaffected by the params).INSILICO_LIBRARY_GENERATION/ASSEMBLE_EMPIRICAL_LIBRARYdo no inference.BlockedFlags:--relaxed-prot-inf+--no-prot-infblocked in every step where they'd conflict or have no effect, so they go through the params, notextra_args.usage.md"Protein inference" section with DIA-NN's own examples),nextflow_schema.json, andCHANGELOG.mdupdated.Resulting behaviour (per step)
--no-prot-inf(calibration)--no-prot-infOpen decision for reviewers 👀
The default above follows DIA-NN's documented default (heuristic inference, no flag). There is a defensible alternative worth a maintainer call:
--no-prot-inf/--relaxed-prot-infare opt-in for benchmarks.--no-prot-inf— reuse the empirical-library grouping at both second-pass steps (the maintainer's benchmark recommendation; this is the path where 1.8.1 vs 2.5 protein counts come out ~flat).Flipping the default later is a one-line change (
no_prot_infdefaultfalse → true). Feedback welcome on which should ship as the pipeline default.Notes
relaxed_protein_inferencetoggle on this branch.devmerged in; stalediann_extra_args(removed in favour ofextra_args) cleaned up.