Add per-sample search parameter support via samplesheet#439
Merged
jonasscheid merged 37 commits intonf-core:devfrom Feb 27, 2026
Merged
Add per-sample search parameter support via samplesheet#439jonasscheid merged 37 commits intonf-core:devfrom
jonasscheid merged 37 commits intonf-core:devfrom
Conversation
…plesheet # Conflicts: # modules.json # modules/local/easypqp/convert/main.nf # modules/local/easypqp/library/main.nf # modules/local/epicore/main.nf # modules/local/ms2rescore/main.nf # modules/local/openms/featurefinderidentification/main.nf # modules/local/openms/idconflictresolver/main.nf # modules/local/openms/idmassaccuracy/main.nf # modules/local/openms/mapaligneridentification/main.nf # modules/local/openms/maprttransformer/main.nf # modules/local/openms/mztabexporter/main.nf # modules/local/openms/psmfeatureextractor/main.nf # modules/local/openms/textexporter/main.nf # modules/local/openmsthirdparty/featurelinkerunlabeledkd/main.nf # modules/local/openmsthirdparty/percolatoradapter/main.nf # modules/local/pyopenms/chromatogramextractor/main.nf # modules/local/pyopenms/ionannotator/main.nf # modules/local/tdf2mzml/main.nf # modules/local/untar/main.nf # modules/local/unzip/main.nf # modules/nf-core/openms/idmassaccuracy/tests/main.nf.test # subworkflows/local/map_alignment/main.nf # subworkflows/local/prepare_spectra/main.nf # subworkflows/local/process_feature/main.nf # subworkflows/local/rescore/main.nf # subworkflows/local/speclib/main.nf
- Add 12 optional search parameter columns to schema_input.json (SearchPreset, PeptideMinLength, PeptideMaxLength, PrecursorMassRange, PrecursorCharge, etc.) - Add resolveSearchParams() with priority: individual column > preset > global params - Add search_presets.config with 8 presets (lumos/qe/timstof/xl x class1/class2) - Convert Sample/Condition integers to strings during samplesheet parsing - Add test_search_params profile to nextflow.config
- Apply meta.X ?: params.X pattern for per-sample parameter override in CometAdapter, IDFilter, MS2Rescore, IDMassAccuracy, and IonAnnotator - Add -weights flag to PERCOLATORADAPTER_GLOBAL to avoid filename collisions
- Carry search_preset through ch_rescore_in in mhcquant.nf - Group by preset in RESCORE for IDMERGER_GLOBAL and backfilter via combine(by:0) - Fix EASYPQP_LIBRARY multi-include syntax in speclib subworkflow
- Change Channel.empty() to channel.empty() (lowercase) - Replace implicit 'it' with explicit closure parameter in EPICORE call
Member
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
- Update test_search_params.config to use nf-core/test-datasets samplesheet - Add tests/search_params.nf.test with snapshot - Remove local samplesheets folder (now using test-datasets)
…ile directive - Rename config, test file, and profile from search_params to search_presets - Add profile directive to nf-test file matching other test patterns - Use test-datasets samplesheet URL, remove local samplesheet - Use string concatenation for fasta path matching test.config pattern
…commented lines - Restore nf-core modules to match upstream/dev - Remove emit declarations from version topic outputs in local modules - Remove version emit metadata from local module meta.yml files - Add peptidoform content check to search_presets nf-test
…napshot - Format schema_input.json with prettier - Add search_presets to schema_params lint ignore (nested config map) - Update ionannotator snapshot for topic channel version deduplication
Collaborator
Author
|
@nf-core-bot fix linting |
…p pipeline_if_empty_null
axelwalter
reviewed
Feb 11, 2026
axelwalter
reviewed
Feb 11, 2026
axelwalter
reviewed
Feb 11, 2026
…clarify FDR comment
…ation on NF 25.04
…ce type, update snapshots
…1, make test robust
jonasscheid
commented
Feb 13, 2026
jonasscheid
commented
Feb 13, 2026
jonasscheid
commented
Feb 13, 2026
jonasscheid
commented
Feb 13, 2026
… docs, update fragment tolerance
axelwalter
approved these changes
Feb 27, 2026
Contributor
axelwalter
left a comment
There was a problem hiding this comment.
I like the new simplification by removing the custom parameters from the sample sheet and just keeping the preset column and optional override with CLI params. This approach is straight forward and removes confusion on which settings apply and also de-clutters the sample sheets significantly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for per-sample search parameters in the samplesheet, enabling users to combine samples with different MHC classes, instruments, or search strategies in a single pipeline run. Crucial step towards SDRF-Support #277.
Key Features
assets/search_presets.tsvwith JSON schema validationParameter Priority
Search parameters are resolved with the following priority (highest to lowest):
--fragment_mass_tolerance 0.05) — override everythingSearchPresetcolumn →assets/search_presets.tsv) — predefined parameter setsnextflow.config) — global fallbackCLI override detection uses
workflow.commandLineregex matching to determine if a parameter was explicitly set.Search Preset Parameters
Each preset defines the following parameters:
PeptideMinLength/PeptideMaxLengthPrecursorMassRangePrecursorChargePrecursorMassTolerancePrecursorErrorUnitFragmentMassToleranceFragmentBinOffsetMS2PIPModelActivationMethodInstrumentNumberModsFixedMods/VariableModsAvailable Presets
lumos_class1/qe_class1/astral_class1lumos_class2/qe_class2/astral_class2timstof_class1timstof_class2xl_class1/xl_class2Users can also provide a custom presets TSV via
--search_presets.Implementation Details
assets/search_presets.tsv— TSV file with 10 predefined presetsassets/schema_search_presets.json— JSON schema for preset validation (withmetakey mappings)resolveSearchParams()inutils_nfcore_mhcquant_pipeline/main.nf— priority resolution: CLI > preset > defaultconf/modules.config— CometAdapter/MS2Rescore/IDFilter usemeta.Xfor search paramsmhcquant.nf— passes full search meta into RESCORE via dynamic key subtractionrescore/main.nf— strips search params on emit to maintain downstream join compatibilityTesting
test_search_presets) — stable with full peptidoform snapshotUse Case Example
This allows combining Class I and Class II samples, or different instruments, in a single run with appropriate parameters for each. A CLI override like
--fragment_mass_tolerance 0.05would override all presets globally.Checklist
devbranch