Feature ms2rescore - #16
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR adds MS2Rescore-based rescoring to the mspepid Nextflow pipeline by introducing a dedicated rescoring subworkflow and new local MS2Rescore modules, along with corresponding configuration and schema updates.
Changes:
- Added
SPECTRA_RESCORINGsubworkflow and wired it into the mainMSPEPIDworkflow. - Introduced local MS2Rescore modules to download MS2PIP models and generate MS2Rescore-enhanced PIN files for downstream Percolator runs.
- Added new pipeline parameters (
run_ms2rescore,ms2rescore_model,ms2rescore_model_dir) to config and schema.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| workflows/mspepid.nf | Hooks the new rescoring subworkflow into the main pipeline workflow. |
| main.nf | Passes new MS2Rescore parameters into the MSPEPID workflow. |
| nextflow.config | Adds default MS2Rescore params. |
| nextflow_schema.json | Exposes MS2Rescore params via schema (with minor typos to fix). |
| subworkflows/local/spectra_identification/main.nf | Removes Percolator from identification stage; adds spectrum_id_pattern metadata. |
| subworkflows/local/spectra_rescoring/main.nf | New rescoring orchestration (Percolator and MS2Rescore+Percolator). |
| subworkflows/local/spectra_rescoring/tests/main.nf.test | Adds a test file (currently still template / incorrect for this subworkflow). |
| modules/local/ms2rescore/getmodel/main.nf | New module to validate/download MS2PIP model files. |
| modules/local/ms2rescore/getmodel/environment.yml | Conda env for model download module. |
| modules/local/ms2rescore/runms2rescore/main.nf | New module to run MS2Rescore feature generation and output a PIN. |
| modules/local/ms2rescore/runms2rescore/environment.yml | Conda env for MS2Rescore run module. |
| modules/local/ms2rescore/runms2rescore/meta.yml | Module metadata added (currently still placeholder BAM template). |
| modules/local/ms2rescore/runms2rescore/templates/ms2rescore_run_chunked.py | Python runner to add MS2PIP/DeepLC features chunk-wise and write PIN + versions. |
| conf/modules.config | Adjusts publishDir rules for Percolator and adds MS2Rescore publishDir/chunk size. |
| conf/base.config | Adds resource overrides for MS2RESCORE_RUNMS2RESCORE. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
For Bruker files, at least for my test file, the spectrum title is not matches correctly and ms2rescore raises and error:
ms2pip.exceptions.TitlePatternError: Spectrum title pattern .*scan=(\d+)$could not be matched to spectrum IDindex=7. Are you sure that the regex contains a capturing group?
Implementation of MS2Rescore