Skip to content

extract DIA-NN workflow from quantms - #11

Merged
ypriverol merged 7 commits into
bigbio:devfrom
yueqixuan:dev
Mar 17, 2026
Merged

ypriverol merged 7 commits into
bigbio:devfrom
yueqixuan:dev

Conversation

@yueqixuan

@yueqixuan yueqixuan commented Mar 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Full DIA analysis workflow with DIANN-based quantification, automated file preparation (RAW/.d/mzML), peak-picking and mzML statistics, MSstats integration, and MultiQC/pMultiQC reporting with notification/email summaries.
  • Documentation

    • Expanded usage, outputs, methods/citations, changelog, contribution guide, code of conduct, and extensive developer/agent guidance.
  • Chores

    • Added CI/CD workflows, linting/pre-commit, templates, parameter schema, and project metadata/manifests for reproducibility and testing.

@coderabbitai

coderabbitai Bot commented Mar 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8bc8d99d-63d3-438e-8a63-29cb95c919f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a complete nf-core Nextflow DSL2 proteomics pipeline (quantms/quantmsdiann) with workflows, many new modules/subworkflows for file preparation and DIA-NN quantification, extensive configs and schemas, CI/CD and GitHub Actions, test suites, documentation, assets/templates, and developer tooling.

Changes

Cohort / File(s) Summary
Pipeline entry & orchestration
main.nf, workflows/quantmsdiann.nf, workflows/dia.nf
Adds top-level workflow and modular DIA workflow wiring inputs, subworkflows, version collection, and MultiQC integration.
File-prep & conversion modules
modules/bigbio/thermorawfileparser/*, modules/local/utils/decompress_dotd/*, modules/local/utils/tdf2mzml/*, modules/local/utils/tdf2mzml/*, subworkflows/local/file_preparation/*
New processes/subworkflow to decompress archives, convert Thermo/TDF→mzML, reindex mzML, collect mzML statistics, and optionally peak-pick.
DIANN modules & quantification
modules/local/diann/*
Adds modules for diann config generation, in-silico/empirical library generation, preliminary and individual analyses, final quantification, and diann→MSstats conversion.
Statistics & QC modules
modules/local/msstats/*, modules/local/pmultiqc/*, modules/nf-core/multiqc/*
Processes for MSstats LFQ, pMultiQC/MultiQC report generation and corresponding module manifests and tests.
Input validation & SDRF handling
modules/local/samplesheet_check/*, modules/local/sdrf_parsing/*, subworkflows/local/create_input_channel/*, subworkflows/local/input_check/*
SDRF parsing, sample-sheet checks, and creation of metadata channels for pipeline consumption.
Utility subworkflows & completion
subworkflows/nf-core/utils_*/*, subworkflows/local/utils_nfcore_quantms_pipeline/*
Utility subworkflows for parameter/schema validation, version dumping, notification/email summary, and pipeline completion helpers.
Configs & profiles
nextflow.config, nextflow_schema.json, conf/*.config, conf/modules/*, conf/tests/*
Comprehensive Nextflow configuration, parameter JSON schema, base/dev/test/institutional profiles, module-specific publish rules, and SLURM config.
CI / GitHub Actions / Tests
.github/workflows/*.yml, .github/actions/*/action.yml, tests/*, modules/**/tests/*, subworkflows/**/tests/*
Adds CI workflows (ci/extended_ci/linting/fix_linting/branch protection), composite actions for nf-test shards and nf-test runner, and many nf-test/unit tests and configs.
Linting / formatting
.pre-commit-config.yaml, .prettierrc.yml, .prettierignore, .gitattributes
Pre-commit and Prettier configuration plus linguist/git-attributes entries for Nextflow files.
Documentation & governance
docs/*, CITATIONS.md, CHANGELOG.md, CODE_OF_CONDUCT.md, .github/CONTRIBUTING.md, AGENTS.md, .github/skills/sdrf/*
Extensive user/developer docs, contributing guide, changelog, citations, code of conduct, agent guidance, and SDRF skill doc.
Assets & templates
assets/*
Email/Slack/AdaptiveCard templates, MultiQC config, methods description template, input schema JSON, and sendmail template.
Dev container & tooling
.devcontainer/setup.sh, modules.json, ro-crate-metadata.json, .nf-core.yml, nf-test.config
Devcontainer setup script, modules manifest, RO-Crate metadata, nf-core config, and nf-test settings.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant InputCheck as Input Validation
    participant FilePrep as File Preparation
    participant Meta as Meta Channel Creator
    participant DIA as DIA Workflow
    participant Library as Library Generator
    participant Quant as Quantification
    participant Stats as Statistics
    participant Report as MultiQC/Report

    User->>InputCheck: submit SDRF / sample sheet
    InputCheck->>FilePrep: validated files
    FilePrep->>FilePrep: decompress / convert / index
    FilePrep->>Meta: emit mzML + metadata
    Meta->>DIA: structured meta channels
    DIA->>Library: request library (in-silico or empirical)
    Library->>Quant: provide library
    DIA->>Quant: run preliminary → individual → final quantification
    Quant->>Stats: export DIANN reports
    Stats->>Report: generate/fill MultiQC inputs
    Report->>User: deliver QC report + results
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Poem

🐇 I hopped through configs, modules, and code,
I stitched raw files into mzML road.
Libraries risen, quant cries heard,
Reports assembled, each metric stirred.
A tiny rabbit applauds this scientific ode! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (38)
conf/tests/test_localize.config-28-29 (1)

28-29: ⚠️ Potential issue | 🟠 Major

Pin remote test assets to immutable commits for reproducible CI.

Line 28 and Line 29 reference mutable raw.githubusercontent.com/.../quantms/... paths. If test data changes upstream, this profile can become flaky/non-reproducible.

Suggested hardening
-    input = 'https://raw.githubusercontent.com/bigbio/quantms-test-datasets/quantms/testdata/lfq_ci_phospho/test_phospho.sdrf'
-    database = 'https://raw.githubusercontent.com/bigbio/quantms-test-datasets/quantms/testdata/lfq_ci_phospho/pools_crap_targetdecoy.fasta'
+    input = 'https://raw.githubusercontent.com/bigbio/quantms-test-datasets/<PINNED_COMMIT_SHA>/testdata/lfq_ci_phospho/test_phospho.sdrf'
+    database = 'https://raw.githubusercontent.com/bigbio/quantms-test-datasets/<PINNED_COMMIT_SHA>/testdata/lfq_ci_phospho/pools_crap_targetdecoy.fasta'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@conf/tests/test_localize.config` around lines 28 - 29, The two remote test
asset URLs assigned to the input and database variables are pointing at mutable
branch paths; replace them with URLs pinned to an immutable commit SHA
(raw.githubusercontent.com/.../<commit-sha>/...) so CI is reproducible. Locate
the input and database assignments in the config and update their URLs to use
the specific commit hash from the quantms-test-datasets repository (or vendor
the files locally if preferred), ensuring both input and database reference the
same immutable revision.
assets/methods_description_template.yml-1-1 (1)

1-1: ⚠️ Potential issue | 🟠 Major

Update the template to point at the extracted workflow, not the upstream repo.

These fields still identify the pipeline as bigbio/quantms and link to https://github.com/bigbio/quantms. In this extracted quantmsdiann repo, that will generate the wrong Methods text and send users to the wrong project page.

Suggested fix
-id: "bigbio-quantms-methods-description"
+id: "bigbio-quantmsdiann-methods-description"
-section_name: "bigbio/quantms Methods Description"
-section_href: "https://github.com/bigbio/quantms"
+section_name: "bigbio/quantmsdiann Methods Description"
+section_href: "https://github.com/bigbio/quantmsdiann"
...
-  <p>Data was processed using bigbio/quantms v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows ...
+  <p>Data was processed using bigbio/quantmsdiann v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows ...

Also applies to: 3-4, 9-9

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/methods_description_template.yml` at line 1, The methods template
still identifies the pipeline as "bigbio/quantms" and links to
https://github.com/bigbio/quantms; update the template entry with id
"bigbio-quantms-methods-description" to reference the extracted
workflow/repository (e.g., quantmsdiann) and its correct README or project URL
instead of the upstream repo, and update any other occurrences (the fields at
the other occurrences noted around the same template) so the Methods text and
links point to the extracted workflow project rather than bigbio/quantms.
modules/nf-core/multiqc/meta.yml-59-75 (1)

59-75: ⚠️ Potential issue | 🟠 Major

Fix inconsistent output patterns/types in metadata.

plots is declared as *_plots but points to *_data and type: file (Line 72/74), and report uses pattern: ".html" (Line 63). These mismatches can confuse module consumers and fail metadata validation.

Proposed metadata fix
 output:
   report:
     - "*.html":
         type: file
         description: MultiQC report file
-        pattern: ".html"
+        pattern: "*.html"
         ontologies: []
   data:
     - "*_data":
         type: directory
         description: MultiQC data dir
-        pattern: "multiqc_data"
+        pattern: "*_data"
   plots:
     - "*_plots":
-        type: file
+        type: directory
         description: Plots created by MultiQC
-        pattern: "*_data"
+        pattern: "*_plots"
         ontologies: []
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/nf-core/multiqc/meta.yml` around lines 59 - 75, The metadata has
inconsistent output declarations: the report entry uses pattern ".html" but
should match "*.html" and the plots entry is named "*_plots" yet uses pattern
"*_data" and type: file while data is a directory; update the report pattern to
"*.html", change the plots pattern to "*_plots" and set its type to directory
(or to file if plots are files—ensure consistency with actual outputs), and
ensure the data entry remains a directory with pattern "multiqc_data" so that
keys report, data, and plots correctly reflect actual output names and types.
assets/schema_input.json-7-28 (1)

7-28: ⚠️ Potential issue | 🟠 Major

Add required array to enforce mandatory fields.

The errorMessage for each property states the fields "must be provided", but there's no required array in the schema to enforce this. Without it, the schema will accept objects missing these properties.

🛠️ Proposed fix
         "properties": {
             "source name": {
                 "type": "string",
                 "pattern": "^\\S+$",
                 "errorMessage": "Sample name must be provided and cannot contain spaces"
             },
             "comment[data file]": {
                 "type": "string",
                 "format": "file-path",
                 "errorMessage": "Spectrum files must be provided",
                 "meta": ["id"]
             },
             "assay name": {
                 "type": "string",
                 "pattern": "^\\S+$",
                 "errorMessage": "Assay name must be provided and cannot contain spaces",
                 "meta": ["assay"]
             }
-        }
+        },
+        "required": ["source name", "comment[data file]", "assay name"]
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/schema_input.json` around lines 7 - 28, The schema under "items"
currently defines properties ("source name", "comment[data file]", "assay name")
with errorMessage text that implies they are mandatory but lacks a required
array; add a "required" array inside the same "items" object listing these exact
property names (e.g., "source name", "comment[data file]", "assay name") so the
validator enforces their presence and matches the existing errorMessage behavior
for those fields.
conf/pride_codon_slurm.config-23-25 (1)

23-25: ⚠️ Potential issue | 🟠 Major

Avoid user-specific hardcoded paths in shared profile config.

Lines 23–25 and Line 51 hardcode a personal workspace path. This profile becomes brittle and non-reusable for other users/environments.

Proposed refactor
+params {
+    reanalysis_root = "/hps/nobackup/juan/pride/reanalysis"
+}
+
 singularity {
-    runOptions = '-B /hps/nobackup/juan/pride/reanalysis:/hps/nobackup/juan/pride/reanalysis'
-    cacheDir = "/hps/nobackup/juan/pride/reanalysis/singularity/"
+    runOptions = "-B ${params.reanalysis_root}:${params.reanalysis_root}"
+    cacheDir = "${params.reanalysis_root}/singularity/"
 }
 ...
     withLabel: diann {
-        container = '/hps/nobackup/juan/pride/reanalysis/singularity/ghcr.io-bigbio-diann-1.9.2.sif'
+        container = "${params.reanalysis_root}/singularity/ghcr.io-bigbio-diann-1.9.2.sif"
     }

Also applies to: 50-52

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@conf/pride_codon_slurm.config` around lines 23 - 25, The config currently
hardcodes a personal workspace path in runOptions and cacheDir (and the same
pattern around the other occurrence) making the shared profile brittle; update
the profile to remove user-specific paths by parameterizing these values (e.g.,
use an environment variable or profile placeholder such as HOME, a configurable
baseDir or singularityCache variable) and update runOptions and cacheDir (and
the duplicate occurrence) to reference that variable instead of
"/hps/nobackup/juan/pride/reanalysis", ensuring defaults are provided if the
env/placeholder is unset.
modules/local/sdrf_parsing/meta.yml-35-38 (1)

35-38: ⚠️ Potential issue | 🟠 Major

Update output key to match emit channel naming.

Line 35 declares version (singular), but modules/local/sdrf_parsing/main.nf emits versions (plural) on line 16. Update the meta.yml output key to versions for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/sdrf_parsing/meta.yml` around lines 35 - 38, Change the output
key in the module metadata from "version" to "versions" so it matches the emit
channel used in main.nf; update the entry where "version:" is declared in
modules/local/sdrf_parsing/meta.yml to "versions:" to align with the channel
name emitted by main.nf (the emit of "versions" on line 16).
modules/local/diann/diann_msstats/meta.yml-37-45 (1)

37-45: ⚠️ Potential issue | 🟠 Major

Align manifest outputs with main.nf emits.

Line 42 declares version, while modules/local/diann/diann_msstats/main.nf emits versions, and the emitted log artifact is undocumented in this manifest. This interface mismatch can break linting and consumer expectations.

Proposed fix
 output:
   - out_msstats:
       type: file
       description: MSstats input file
       pattern: "*msstats_in.csv"
-  - version:
+  - log:
+      type: file
+      description: Log file
+      pattern: "*.log"
+  - versions:
       type: file
       description: File containing software version
       pattern: "versions.yml"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/diann/diann_msstats/meta.yml` around lines 37 - 45, The
manifest outputs in meta.yml are out of sync with main.nf: change the output key
"version" to "versions" to match the emitted "versions" from
modules/local/diann/diann_msstats/main.nf, and add an entry documenting the
emitted "log" artifact (e.g., a file-type output named "log" with an appropriate
description and pattern) so the manifest and the Nextflow module exports
(out_msstats, versions, log) align.
conf/pride_codon_slurm.config-40-47 (1)

40-47: ⚠️ Potential issue | 🟠 Major

Remove or fix the withName:PROTEOMICSLFQ selector—the process does not exist in the codebase.

The PROTEOMICSLFQ process is not declared anywhere in the Nextflow modules, so this resource configuration rule will never apply. ASSEMBLE_EMPIRICAL_LIBRARY is correctly defined and matches its process declaration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@conf/pride_codon_slurm.config` around lines 40 - 47, The
withName:PROTEOMICSLFQ selector references a non-existent process and should be
removed or corrected: either delete the entire withName:PROTEOMICSLFQ { ... }
block, or rename the selector to the actual process name used in the pipeline
(e.g., the real process that should receive the memory/cpu rules); ensure the
corresponding resource lines (memory and cpus using mzmls and task.attempt) are
preserved under the correct withName selector or merged into an existing rule
such as withName:ASSEMBLE_EMPIRICAL_LIBRARY if that is intended.
assets/slackreport.json-25-25 (1)

25-25: ⚠️ Potential issue | 🟠 Major

Redact more than just hook_url in Slack payload.

Line 25 currently serializes nearly all summary values to Slack. This can leak sensitive values (tokens, secrets, keys, credentials) in chat logs.

Proposed hardening
- "value": "<% out << summary.collect{ k,v -> k == "hook_url" ? "_${k}_: (_hidden_)" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? "_${k}_: `${v}`" : (v.class.toString().contains('DateTime') ? ("_${k}_: " + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : "_${k}_: ${v}") ) }.join(",\n") %>",
+ "value": "<% def sensitive = ['hook_url','password','passwd','secret','token','api_key','apikey','access_key','secret_key','credential']; out << summary.collect{ k,v -> def lk = k.toLowerCase(); sensitive.any{ lk.contains(it) } ? \"_${k}_: (_hidden_)\" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? \"_${k}_: `${v}`\" : (v.class.toString().contains('DateTime') ? (\"_${k}_: \" + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : \"_${k}_: ${v}\") ) }.join(\",\\n\") %>",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/slackreport.json` at line 25, The Slack payload template currently
exposes almost every summary value via the summary.collect expression and only
special-cases "hook_url"; update that expression to redact any sensitive-looking
keys/values (e.g., keys matching
/(hook|url|token|secret|key|password|credential|auth)/i or values that look like
long hex/base64 strings or bearers) by returning "_${k}_: (_hidden_)" for those
cases, keep the existing safe formatting for Paths/URLs and DateTime, and ensure
values that match secret patterns are never interpolated into the string; locate
the template snippet using summary.collect{ k,v -> ... } and add the regex
checks and conditional branches to mask secrets before joining.
assets/slackreport.json-15-29 (1)

15-29: ⚠️ Potential issue | 🟠 Major

Add assets/slackreport.json to Biome ignore patterns or mark it as a template.

The file contains Groovy template syntax (<% %>) mixed with JSON, which fails strict JSON validation. Since biome.json has linting enabled but no exclusions for this file, it will fail linting if Biome is ever invoked. Either add an ignore pattern to biome.json or use a file extension/naming convention that signals this as a template (e.g., slackreport.json.groovy).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assets/slackreport.json` around lines 15 - 29, The file
assets/slackreport.json contains Groovy template syntax (e.g., the <% ... %>
blocks and variables like errorReport and summary.collect) which breaks strict
JSON linting; either add an ignore pattern for this file in your lint config
(biome.json) or rename the file to indicate it is a template (for example
slackreport.json.groovy or slackreport.json.tpl) so the linter skips it—update
biome.json's "ignore" or "exclude" array to include "assets/slackreport.json"
(or the new template filename) and ensure any CI/lint configs reference the same
ignore pattern.
.github/workflows/branch.yml-18-18 (1)

18-18: ⚠️ Potential issue | 🟠 Major

Fix branch gate logic for patch branches.

The current condition only allows exact patch branch (not patch/* branches), and permits PRs from forks when head ref is patch. The logic needs to verify the repository origin for all branch conditions.

Current behavior:

  • patch/1.2.3 from bigbio/quantms: fails (should pass)
  • patch from fork repo: passes (should fail)
Proposed fix
-          { [[ ${{github.event.pull_request.head.repo.full_name }} == bigbio/quantms ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
+          [[ "${{ github.event.pull_request.head.repo.full_name }}" == "bigbio/quantms" ]] && \
+          { [[ "$GITHUB_HEAD_REF" == "dev" ]] || [[ "$GITHUB_HEAD_REF" == patch* ]]; }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/branch.yml at line 18, Update the branch gate conditional
so repository origin is verified for both dev and patch branches: require
github.event.pull_request.head.repo.full_name == bigbio/quantms AND
(GITHUB_HEAD_REF == "dev" OR GITHUB_HEAD_REF starts with "patch/"); replace the
current compound condition that uses { ... } || [[ $GITHUB_HEAD_REF == "patch"
]] with a single [[ ... ]] expression that checks the repo equality and uses a
pattern match like [[ $GITHUB_HEAD_REF == patch* ]] (or [[ $GITHUB_HEAD_REF ==
patch/* ]]) for patch branches while keeping the exact match for "dev"; ensure
variables referenced are github.event.pull_request.head.repo.full_name and
GITHUB_HEAD_REF so fork PRs with head ref "patch" are rejected and branches like
"patch/1.2.3" from bigbio/quantms are allowed.
modules/local/openms/openms_peak_picker/main.nf-22-22 (1)

22-22: ⚠️ Potential issue | 🟠 Major

Fix typo in processOption value.

Line 22 contains "inmermory" which is invalid. The correct value is "inmemory".

Proposed fix
-    in_mem = params.peakpicking_inmemory ? "inmermory" : "lowmemory"
+    in_mem = params.peakpicking_inmemory ? "inmemory" : "lowmemory"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/openms/openms_peak_picker/main.nf` at line 22, The ternary
assigning in_mem uses a typo "inmermory"; update the expression that assigns
in_mem (based on params.peakpicking_inmemory) to use the correct string
"inmemory" instead of "inmermory" so downstream processOption receives the valid
value.
modules/local/samplesheet_check/main.nf-23-24 (1)

23-24: ⚠️ Potential issue | 🟠 Major

Use the validate_ontologies input instead of the global param.

Line 24 ignores the value declared on Line 12 and reads params.validate_ontologies directly. That makes per-call overrides ineffective, so callers can pass validate_ontologies = false and still get whatever the global config says.

Proposed fix
-    def string_skip_sdrf_validation = params.validate_ontologies == false ? "--skip_sdrf_validation" : ""
+    def string_skip_sdrf_validation = validate_ontologies == false ? "--skip_sdrf_validation" : ""
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/samplesheet_check/main.nf` around lines 23 - 24, The code
builds string_skip_sdrf_validation using the global params.validate_ontologies
which ignores the per-call input; update the condition to use the local input
variable (the declared validate_ontologies input) instead of
params.validate_ontologies so per-call overrides work—e.g., set
string_skip_sdrf_validation based on validate_ontologies (the input) when
constructing args and leave args and string_skip_sdrf_validation names intact.
modules/local/diann/preliminary_analysis/main.nf-45-52 (1)

45-52: ⚠️ Potential issue | 🟠 Major

Guard missing tolerance metadata before calling toLowerCase().

Line 47 dereferences the tolerance-unit fields unconditionally. If preprocessing leaves any of these keys null or absent, this process fails during script evaluation instead of falling back to DIA-NN auto calibration.

Proposed fix
     if (params.mass_acc_automatic) {
         mass_acc = ""
-    } else if (meta['precursormasstoleranceunit'].toLowerCase().endsWith('ppm') && meta['fragmentmasstoleranceunit'].toLowerCase().endsWith('ppm')){
+    } else if (
+        meta['precursormasstolerance'] != null &&
+        meta['fragmentmasstolerance'] != null &&
+        meta['precursormasstoleranceunit']?.toString()?.toLowerCase()?.endsWith('ppm') &&
+        meta['fragmentmasstoleranceunit']?.toString()?.toLowerCase()?.endsWith('ppm')
+    ) {
         mass_acc = "--mass-acc ${meta['fragmentmasstolerance']} --mass-acc-ms1 ${meta['precursormasstolerance']}"
     } else {
         log.info "Warning: DIA-NN only supports ppm unit tolerance for MS1 and MS2. Falling back to `mass_acc_automatic`=`true` to automatically determine the tolerance by DIA-NN!"
         mass_acc = ""
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/diann/preliminary_analysis/main.nf` around lines 45 - 52, The
code dereferences meta['precursormasstoleranceunit'] and
meta['fragmentmasstoleranceunit'] without null checks before calling
toLowerCase(), which can throw if keys are missing; update the conditional in
the block that assigns mass_acc (and references params.mass_acc_automatic,
mass_acc, and log.info) to first verify both meta entries exist and are
non-empty (e.g. check they are not null/undefined/empty) before calling
toLowerCase() and performing the endsWith('ppm') checks, and if either is absent
or empty fall back to setting mass_acc = "" and logging the same warning so
DIA-NN auto calibration is used.
subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml-16-25 (1)

16-25: ⚠️ Potential issue | 🟠 Major

I/O contract in meta.yml is completely incorrect.

The metadata declares ch_input and ch_fdr_results (FDR-related channels), but the PIPELINE_COMPLETION workflow actually takes email/notification parameters (email, email_on_fail, outdir, hook_url, multiqc_report, etc.) and emits no channels. Replace the meta.yml I/O section with the correct inputs and outputs that match the take: and emit: blocks in main.nf.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml` around lines 16 -
25, The meta.yml I/O section is wrong: replace the declared channels (ch_input,
ch_fdr_results) with inputs that match the PIPELINE_COMPLETION workflow's take:
entries (e.g. email, email_on_fail, outdir, hook_url, multiqc_report, and any
other parameters listed in main.nf) and remove or set outputs to reflect that
the workflow emits no channels; update the top-level inputs: and outputs: blocks
in meta.yml so the keys and types/descriptions line up exactly with the names
and semantics used in main.nf's PIPELINE_COMPLETION take:/emit: blocks.
subworkflows/local/input_check/main.nf-15-15 (1)

15-15: 🛠️ Refactor suggestion | 🟠 Major

Make validate_ontologies an explicit workflow input instead of accessing params directly.

Add validate_ontologies to the take: block and pass it to SAMPLESHEET_CHECK, improving reusability and testability:

Suggested diff
 workflow INPUT_CHECK {
     take:
     input_file
+    validate_ontologies
 
     main:
 
     ch_software_versions = channel.empty()
 
-    SAMPLESHEET_CHECK ( input_file, params.validate_ontologies )
+    SAMPLESHEET_CHECK ( input_file, validate_ontologies )
     ch_software_versions = ch_software_versions.mix(SAMPLESHEET_CHECK.out.versions)
 
     emit:
     ch_input_file   = SAMPLESHEET_CHECK.out.checked_file
     versions        = ch_software_versions
 }

Update the call site in workflows/quantmsdiann.nf (line 41) to pass the parameter:

INPUT_CHECK( file(params.input), params.validate_ontologies )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/input_check/main.nf` at line 15, Make validate_ontologies
an explicit input instead of reading params inside the subworkflow: add
validate_ontologies to the take: block of the INPUT_CHECK/SAMPLESHEET_CHECK
workflow and change the SAMPLESHEET_CHECK invocation to accept it as a parameter
(SAMPLESHEET_CHECK(input_file, validate_ontologies)); also update the caller in
workflows/quantmsdiann.nf to pass params.validate_ontologies into INPUT_CHECK
(e.g., INPUT_CHECK(file(params.input), params.validate_ontologies)) so the
subworkflow no longer references params directly.
conf/modules/shared.config-37-47 (1)

37-47: ⚠️ Potential issue | 🟠 Major

Group alternation in withName regex selectors to avoid unintended process matches.

The ungrouped patterns at lines 37 and 46 allow the second and subsequent alternatives to match without the namespace prefix, causing publishDir to apply to unintended processes. For example, .*:MSSTATS_LFQ|MSSTATS_TMT matches both WF:SUB:MSSTATS_LFQ and bare MSSTATS_TMT (without namespace), while it fails to match WF:SUB:MSSTATS_TMT.

Suggested fix
-    withName: '.*:MSSTATS_LFQ|MSSTATS_TMT' {
+    withName: '.*:(MSSTATS_LFQ|MSSTATS_TMT)' {
         publishDir = [
             path: { "${params.outdir}/msstats" },
             mode: 'copy',
             saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
         ]
     }

-    withName: '.*:PROTEOMICSLFQ|PROTEIN_QUANTIFIER|MSSTATS_CONVERTER|FINAL_QUANTIFICATION|DIANN_MSSTATS' {
+    withName: '.*:(PROTEOMICSLFQ|PROTEIN_QUANTIFIER|MSSTATS_CONVERTER|FINAL_QUANTIFICATION|DIANN_MSSTATS)' {
         publishDir = [
             path: { "${params.outdir}/quant_tables" },
             mode: 'copy',
             saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
         ]
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@conf/modules/shared.config` around lines 37 - 47, The withName regex
selectors (e.g., withName: '.*:MSSTATS_LFQ|MSSTATS_TMT' and the longer withName
listing
PROTEOMICSLFQ|PROTEIN_QUANTIFIER|MSSTATS_CONVERTER|FINAL_QUANTIFICATION|DIANN_MSSTATS)
use ungrouped alternation which lets later alternatives match without the
expected namespace prefix; update both selectors to group the alternation so the
namespace prefix applies to every alternative (e.g., change to a pattern that
uses parentheses around the alternatives after the colon), ensuring publishDir
only matches processes with the full namespace-prefixed names.
subworkflows/nf-core/utils_nextflow_pipeline/meta.yml-23-26 (1)

23-26: ⚠️ Potential issue | 🟠 Major

Fix parameter name mismatch: check_conda_channel vs check_conda_channels.

The manifest declares the parameter as check_conda_channel (singular, line 23), but main.nf expects check_conda_channels (plural, lines 16, 38). This inconsistency will cause the parameter to be ignored at runtime and confuse users following the documentation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/nf-core/utils_nextflow_pipeline/meta.yml` around lines 23 - 26,
The manifest parameter name is inconsistent: meta.yml defines
check_conda_channel (singular) while main.nf uses check_conda_channels (plural);
update the manifest to match the pipeline by renaming check_conda_channel to
check_conda_channels in meta.yml (or alternatively rename usages in main.nf) so
the parameter declared in meta.yml matches the symbol main.nf expects
(check_conda_channels) and will be honored at runtime.
.github/workflows/diann_private.yml-51-53 (1)

51-53: ⚠️ Potential issue | 🟠 Major

Harden shell commands by quoting variables and removing ls in command substitution.

Line 52 has unquoted and partially-quoted variables: $TEST_PROFILE,$EXEC_PROFILE can split on the comma, and ${GITHUB_WORKSPACE} should be quoted to prevent word splitting if the path contains spaces.

Lines 58-59 have multiple issues:

  • Line 58 uses an unquoted path with variables and no check if the file exists
  • Line 59 uses ls in command substitution ($(ls work/${line}*/*.log)), which is brittle and fails if filenames contain spaces or newlines; should use the glob directly
  • No error handling if the grep finds no results or the file doesn't exist
Suggested fix
-          nextflow run ${GITHUB_WORKSPACE} -profile $TEST_PROFILE,$EXEC_PROFILE --outdir ${TEST_PROFILE}_${EXEC_PROFILE}_results
+          nextflow run "${GITHUB_WORKSPACE}" -profile "${TEST_PROFILE},${EXEC_PROFILE}" --outdir "${TEST_PROFILE}_${EXEC_PROFILE}_results"
@@
-          failed=$(grep "FAILED" ${TEST_PROFILE}_${EXEC_PROFILE}_results/pipeline_info/execution_trace.txt | cut -f 2)
-          while read -r line ; do cp $(ls work/${line}*/*.log) failed_logs/ | true ; done <<< "$failed"
+          trace="${TEST_PROFILE}_${EXEC_PROFILE}_results/pipeline_info/execution_trace.txt"
+          if [[ -f "$trace" ]]; then
+            failed=$(grep "FAILED" "$trace" | cut -f 2 || true)
+            while read -r line; do
+              cp work/${line}*/*.log failed_logs/ 2>/dev/null || true
+            done <<< "$failed"
+          fi

Also applies to: lines 57-59

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/diann_private.yml around lines 51 - 53, Quote shell
variables and avoid command-substitution with ls: change the Nextflow invocation
to quote "${GITHUB_WORKSPACE}" and pass the profiles as a single
quoted/concatenated argument (referencing TEST_PROFILE and EXEC_PROFILE) to
prevent word-splitting; replace uses of $(ls work/${line}*/*.log) with a safe
glob expansion (e.g., iterate over work/${line}*/*.log) and add existence checks
before grepping (check the file exists and is non-empty, and guard grep with ||
true or test output) so grep is not run on missing files and filenames with
spaces are handled safely.
modules/local/diann/final_quantification/meta.yml-50-53 (1)

50-53: ⚠️ Potential issue | 🟠 Major

Change output label from version to versions to match the emit label in main.nf.

The meta.yml defines - version: at line 50, but the corresponding main.nf (line 38) emits this output as versions. This mismatch breaks consistency—all bigbio modules and universal emit patterns use the plural form. Changing this to - versions: will align the metadata contract with the process output definition and ensure proper lint validation and channel documentation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/diann/final_quantification/meta.yml` around lines 50 - 53, The
meta.yml currently defines an output key named "version" but main.nf emits this
channel as "versions", causing a mismatch; update the metadata entry in meta.yml
to rename the output from "- version:" to "- versions:" so it matches the emit
label used in main.nf (and aligns with other bigbio modules' plural naming
conventions), ensuring linting and channel documentation remain consistent.
.github/workflows/linting_comment.yml-6-7 (1)

6-7: ⚠️ Potential issue | 🟠 Major

Add types: [completed] to the workflow trigger and use run_id to reference the triggering workflow.

The workflow currently triggers on all workflow_run activity types (requested, in progress, and completed), causing unnecessary early executions. Add types: [completed] to trigger only when the upstream workflow finishes.

Additionally, the download-artifact step should use run_id: ${{ github.event.workflow_run.id }} to fetch artifacts from the specific triggering run. However, note that the dawidd6/action-download-artifact action's documentation states that run_id and workflow_conclusion are mutually exclusive parameters (choose one selection method). If run_id is added, remove the workflow_conclusion: completed line.

Suggested approach
 on:
   workflow_run:
     workflows: ["nf-core linting"]
+    types: [completed]
@@
       - name: Download lint results
         uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11
         with:
           workflow: linting.yml
-          workflow_conclusion: completed
+          run_id: ${{ github.event.workflow_run.id }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/linting_comment.yml around lines 6 - 7, Update the
workflow_run trigger to only fire on completed upstream runs by adding types:
[completed] under workflow_run, then change the download-artifact step to use
run_id: ${{ github.event.workflow_run.id }} when calling the
dawidd6/action-download-artifact action; because run_id and workflow_conclusion
are mutually exclusive, remove the workflow_conclusion: completed parameter if
you add run_id to the action invocation.
subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json-3-4 (1)

3-4: ⚠️ Potential issue | 🟠 Major

Replace leftover template placeholders in schema metadata.

The $id and title fields contain incomplete placeholders (/./master/ and . pipeline). Replace them with project-specific values:

Proposed fix
-    "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json",
-    "title": ". pipeline parameters",
+    "$id": "https://raw.githubusercontent.com/bigbio/quantmsdiann/main/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json",
+    "title": "quantmsdiann pipeline parameters",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json` around
lines 3 - 4, Update the schema metadata by replacing the placeholder values in
the JSON fields "$id" and "title" inside nextflow_schema.json: set "$id" to the
repository-appropriate canonical URL or package identifier (e.g., the raw GitHub
URL pointing to the file in its repo) and change "title" from ". pipeline
parameters" to a meaningful project-specific title (e.g., "nf-core
<pipeline-name> pipeline parameters"); ensure the resulting strings are accurate
for the project and valid JSON.
subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test-30-32 (1)

30-32: ⚠️ Potential issue | 🟠 Major

Replace template placeholder input in dumpParametersToJSON test.

Line 31 uses an example placeholder ("$outputDir") that is not defined in the test context, making this test brittle and not self-contained. The function dumpParametersToJSON(outdir) expects a directory path string as its input parameter.

Proposed fix
-                // define inputs of the function here. Example:
-                input[0] = "$outputDir"
+                input[0] = "results"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test`
around lines 30 - 32, The test uses a template placeholder input[0] =
"$outputDir" which is undefined; replace it with a concrete directory path
string or the test's local variable (e.g., set input[0] = outdir or a temp path
like "/tmp/test_outdir") so that the dumpParametersToJSON(outdir) call receives
a valid path; update the test to create/ensure that directory exists (or mock
it) and use that concrete value wherever input[0] is referenced so the test is
self-contained and deterministic.
.github/workflows/ci.yml-31-31 (1)

31-31: ⚠️ Potential issue | 🟠 Major

Job gate prevents push-triggered CI from running in this repository.

Line 31 checks github.repository == 'bigbio/quantms', but the actual repository is bigbio/quantmsdiann. This causes all push-triggered jobs to be skipped.

Proposed fix
-    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'bigbio/quantms') }}
+    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'bigbio/quantmsdiann') }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 31, The CI conditional gate uses the wrong
repository string (github.repository == 'bigbio/quantms') causing push-triggered
jobs to be skipped; update the condition to match this repository by replacing
'bigbio/quantms' with 'bigbio/quantmsdiann' in the if expression so the line
reads: if: ${{ github.event_name != 'push' || (github.event_name == 'push' &&
github.repository == 'bigbio/quantmsdiann') }} (or alternatively remove the
repository check entirely if you want push events to run for forks too).
modules/local/diann/insilico_library_generation/main.nf-12-12 (1)

12-12: ⚠️ Potential issue | 🟠 Major

Use the declared diann_config input instead of the hard-coded filename.

Line 48 ignores the input declared on line 12 and assumes diann_config.cfg exists. This breaks if the upstream process outputs a file with a different name or if naming conventions change.

Additionally, line 68 uses a wildcard pattern (*lib.log.txt) that will fail if no matches exist or multiple files match.

Proposed fix
-    diann `cat diann_config.cfg` \\
+    diann $(cat "${diann_config}") \\
-    cp *lib.log.txt silicolibrarygeneration.log
+    cp $(ls -1 *lib.log.txt) silicolibrarygeneration.log
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/diann/insilico_library_generation/main.nf` at line 12, The
Nextflow script is ignoring the declared input diann_config and hard-codes
"diann_config.cfg" and a fragile wildcard "*lib.log.txt"; update the process to
reference the diann_config input variable (diann_config) wherever the config
path is used instead of the literal "diann_config.cfg" and stop relying on a
glob for the library log—either accept the library log as an explicit input
(e.g., add a channel input for the lib log) or resolve the glob defensively
(check for exactly one match and fail with a clear error) so multiple/no matches
are handled; look for occurrences of diann_config, "diann_config.cfg", and
"*lib.log.txt" in main.nf and replace with the input variable or safe
existence-check logic.
.github/workflows/ci.yml-4-8 (1)

4-8: ⚠️ Potential issue | 🟠 Major

Update hard-coded master branch references to match repository's default branch main.

Lines 7 and 77 reference master which is inconsistent with the repository's actual default branch. This can cause unintended workflow behavior.

Proposed fix
   push:
     branches:
       - dev
-      - master
+      - main
-        if: github.event.pull_request.base.ref != 'master'
+        if: github.event_name != 'pull_request' || github.event.pull_request.base.ref != github.event.repository.default_branch
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 4 - 8, Replace hard-coded 'master'
branch references in the CI workflow with the repository's default 'main':
update the push.branches array entry that currently lists "master" to "main" and
change any other occurrences of the literal "master" in this workflow (e.g., the
second reference noted around line 77) to "main" so the push and pull_request
triggers use the correct default branch; verify there are no remaining "master"
strings in the file after edit.
modules/local/msstats/msstats_lfq/main.nf-10-10 (1)

10-10: ⚠️ Potential issue | 🟠 Major

Broad *.csv output glob can re-emit the staged input CSV.

The *.csv pattern on line 16 will match any CSV in the work directory, including the staged input file (out_msstats.csv). While msstats_plfq.R is designed to produce specific outputs (msstats_results.csv, comparison_<contrast>.csv), the glob does not enforce their exclusion and will emit the input file as an output artifact, polluting downstream channels. Narrow the glob to match only actual result filenames, or write outputs to a dedicated subdirectory and emit from there.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/msstats/msstats_lfq/main.nf` at line 10, The output glob
currently emits any *.csv (via the msstats_csv_input output) and will therefore
re-emit the staged input out_msstats.csv; change the workflow to emit only the
real result files from msstats_plfq.R (e.g. msstats_results.csv and
comparison_<contrast>.csv) or write all R outputs into a dedicated subdirectory
(e.g. results/) and emit only that directory (e.g. results/*.csv). Update the
msstats_csv_input output declaration to list the exact filenames or the results/
subdir pattern and, if needed, modify msstats_plfq.R to write its outputs into
that subdirectory so the input CSV is not included.
modules/local/diann/individual_analysis/main.nf-47-47 (1)

47-47: ⚠️ Potential issue | 🟠 Major

Use logical OR || instead of bitwise OR |.

The condition uses bitwise OR (|) instead of logical OR (||). While this may work for boolean values, it's semantically incorrect and won't short-circuit. This could lead to unexpected behavior if parameter values are not strictly boolean.

🐛 Proposed fix
-    if (params.mass_acc_automatic | params.scan_window_automatic) {
+    if (params.mass_acc_automatic || params.scan_window_automatic) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/diann/individual_analysis/main.nf` at line 47, The conditional
currently uses the bitwise OR operator (`|`) between params.mass_acc_automatic
and params.scan_window_automatic; replace it with the logical OR operator (`||`)
so the check reads as a proper boolean short-circuit (i.e., use
params.mass_acc_automatic || params.scan_window_automatic) to avoid incorrect
evaluation when values are not strictly booleans and to enable short-circuit
behavior in the if statement.
.github/workflows/fix_linting.yml-12-12 (1)

12-12: ⚠️ Potential issue | 🟠 Major

Repository name mismatch will prevent workflow from triggering.

The condition checks for github.repository == 'bigbio/quantms', but this PR is for bigbio/quantmsdiann. The workflow will never run in the target repository.

🐛 Proposed fix
-      github.repository == 'bigbio/quantms'
+      github.repository == 'bigbio/quantmsdiann'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/fix_linting.yml at line 12, The workflow conditional
currently checks github.repository == 'bigbio/quantms' which prevents it running
for this repo; update the condition to github.repository ==
'bigbio/quantmsdiann' (or remove the strict repository check) so the workflow
triggers for this pull request, and ensure the expression in the workflow file
(.github/workflows/fix_linting.yml) reflects the correct repository name.
subworkflows/local/create_input_channel/main.nf-24-28 (1)

24-28: ⚠️ Potential issue | 🟠 Major

Extract the SDRF file value before storing in wrapper.experiment_id.

Storing the channel object ch_sdrf in the wrapper causes the issue at line 65: file(wrapper.experiment_id.toString()).baseName converts a channel identifier (e.g., "queue_1") to a string rather than the actual file path, producing an incorrect experiment ID. The SDRF file value should be extracted from the channel before being stored in the wrapper, or the experiment ID logic should be restructured to access the channel directly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/create_input_channel/main.nf` around lines 24 - 28, The
wrapper currently stores the channel object ch_sdrf in wrapper.experiment_id
which results in using the channel identifier instead of the SDRF file path;
when constructing wrapper, extract the SDRF file value from ch_sdrf (e.g., by
calling ch_sdrf.first() or mapping the channel to its file path) and assign that
file path or filename string to wrapper.experiment_id so subsequent code
(file(wrapper.experiment_id.toString()).baseName) yields the correct experiment
ID; update the wrapper assignment around def wrapper to use the extracted value
and/or adjust the logic that builds experiment_id to operate on the channel's
actual file value rather than the channel object.
.github/workflows/extended_ci.yml-95-103 (1)

95-103: ⚠️ Potential issue | 🟠 Major

Bug: matrix.exec_profile is undefined - should use env.EXEC_PROFILE.

The workflow references matrix.exec_profile but the matrix only defines NXF_VER and test_profile. The execution profile is defined as an environment variable EXEC_PROFILE, not in the matrix. This will cause the artifact path to be empty or incorrect.

🐛 Proposed fix
       - uses: actions/upload-artifact@v4
         if: always()
         name: Upload results
         with:
           name: ${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_results
           include-hidden-files: true
-          path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results
+          path: ${{ matrix.test_profile }}_${{ env.EXEC_PROFILE }}_results
           overwrite: false
           if-no-files-found: warn
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/extended_ci.yml around lines 95 - 103, The artifact upload
step incorrectly uses matrix.exec_profile (undefined) for the artifact
name/path; update the expressions to use the environment variable instead by
replacing occurrences of matrix.exec_profile with ${{ env.EXEC_PROFILE }} (e.g.,
in the actions/upload-artifact step’s name and path fields) so the artifact path
uses the actual EXEC_PROFILE value.
.github/workflows/extended_ci.yml-201-209 (1)

201-209: ⚠️ Potential issue | 🟠 Major

Bug: Same matrix.exec_profile issue in Singularity job.

Same issue as in the Docker job - matrix.exec_profile is undefined.

🐛 Proposed fix
       - uses: actions/upload-artifact@v4
         if: always()
         name: Upload results
         with:
           name: ${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_${{ env.ARTIFACT_TIMESTAMP }}_results
           include-hidden-files: true
-          path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results
+          path: ${{ matrix.test_profile }}_${{ env.EXEC_PROFILE }}_results
           overwrite: false
           if-no-files-found: warn
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/extended_ci.yml around lines 201 - 209, The Singularity
upload-artifact step uses an undefined matrix variable matrix.exec_profile;
update the actions/upload-artifact step (the "name" and "path" fields in that
step) to use the correct matrix variable used elsewhere (replace
matrix.exec_profile with matrix.NXF_EXEC_PROFILE) so the artifact name and path
become ${{ matrix.test_profile }}_${{ matrix.NXF_EXEC_PROFILE }}_results and ${{
matrix.test_profile }}_${{ matrix.NXF_EXEC_PROFILE }}_results respectively.
workflows/dia.nf-150-150 (1)

150-150: ⚠️ Potential issue | 🟠 Major

Non-deterministic report selection with .mix(...).last().

Mixing main_report and report_parquet channels and taking .last() creates a race condition. The selected report depends on emission timing, which may vary between runs. If DIA-NN 2.0 only produces parquet, consider explicit conditional logic.

🔧 Proposed fix - prefer parquet when available
-    diann_main_report = FINAL_QUANTIFICATION.out.main_report.mix(FINAL_QUANTIFICATION.out.report_parquet).last()
+    // Prefer parquet format (DIA-NN 2.0+), fallback to TSV
+    diann_main_report = FINAL_QUANTIFICATION.out.report_parquet
+        .ifEmpty(FINAL_QUANTIFICATION.out.main_report)
+        .first()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/dia.nf` at line 150, The current expression diann_main_report =
FINAL_QUANTIFICATION.out.main_report.mix(FINAL_QUANTIFICATION.out.report_parquet).last()
is non-deterministic because mix(...).last() picks whichever item arrives last;
instead choose the parquet report when present by using the channel fallback
operator: construct diann_main_report from
FINAL_QUANTIFICATION.out.report_parquet falling back to
FINAL_QUANTIFICATION.out.main_report (e.g., use
report_parquet.ifEmpty(main_report) or an equivalent explicit
conditional/fallback on FINAL_QUANTIFICATION.out.report_parquet and
FINAL_QUANTIFICATION.out.main_report) so parquet is preferred deterministically.
subworkflows/local/file_preparation/main.nf-124-132 (1)

124-132: ⚠️ Potential issue | 🟠 Major

Peak picking overwrites all previous results.

When openms_peakpicking is enabled, line 131 completely replaces ch_results with only the peak-picked mzMLs. This discards .d and .dia files that were added in lines 117-122, breaking DIA-NN native format support.

🔧 Proposed fix - mix peak-picked results instead of replacing
     if (params.openms_peakpicking) {
-        // If the peak picker is enabled, it will over-write not bypass the .d files
         OPENMS_PEAK_PICKER (
             indexed_mzml_bundle
         )

         ch_versions = ch_versions.mix(OPENMS_PEAK_PICKER.out.versions)
-        ch_results = OPENMS_PEAK_PICKER.out.mzmls_picked
+        // Replace mzML results with peak-picked versions, preserve .d and .dia
+        ch_results = OPENMS_PEAK_PICKER.out.mzmls_picked
+            .mix(ch_branched_input.dotd)
+            .mix(ch_branched_input.dia)
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/file_preparation/main.nf` around lines 124 - 132, When
openms_peakpicking is enabled, the code replaces ch_results with
OPENMS_PEAK_PICKER.out.mzmls_picked, discarding earlier .d/.dia artifacts;
change the assignment so OPENMS_PEAK_PICKER results are mixed into existing
ch_results instead of overwriting it (i.e., use
ch_results.mix(OPENMS_PEAK_PICKER.out.mzmls_picked)); keep the existing
ch_versions.mix(OPENMS_PEAK_PICKER.out.versions) behavior and ensure
OPENMS_PEAK_PICKER still consumes indexed_mzml_bundle as before.
workflows/dia.nf-46-46 (1)

46-46: ⚠️ Potential issue | 🟠 Major

Incorrect closure parameter access in .unique().

The closure { m -> m[0] } accesses m[0] but m is a map (from preprocessed_meta), not a tuple. Map access with [0] doesn't retrieve a meaningful key. This may cause all items to be considered unique or produce unexpected behavior.

🔧 Proposed fix - use the full map or specific key for uniqueness
-    meta = ch_result.meta.unique { m -> m[0] }
+    meta = ch_result.meta.unique()

Or if you need uniqueness by a specific field:

-    meta = ch_result.meta.unique { m -> m[0] }
+    meta = ch_result.meta.unique { m -> m.experiment_id }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/dia.nf` at line 46, The closure passed to unique() is treating each
element as a tuple by using m[0], but ch_result.meta elements are maps (from
preprocessed_meta), so m[0] is invalid and causes incorrect uniqueness; update
the unique call to use either the whole map (e.g., unique { m -> m } ) or a
specific map key that defines uniqueness (e.g., unique { m -> m['yourFieldName']
}) so replace meta = ch_result.meta.unique { m -> m[0] } with a closure that
returns the full map or the correct map key (reference: meta and
ch_result.meta.unique).
subworkflows/local/utils_nfcore_quantms_pipeline/main.nf-43-43 (1)

43-43: ⚠️ Potential issue | 🟠 Major

Potential blocking call with .toList() followed by .getVal() in event handler.

Converting multiqc_report to a list and calling .getVal() inside the workflow.onComplete block (line 56) may cause issues. If the channel hasn't completed by the time onComplete fires, this could block indefinitely or throw an exception.

🔧 Consider collecting reports before the onComplete block
     main:
     summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json")
-    def multiqc_reports = multiqc_report.toList()
+    // Collect reports synchronously - onComplete will access the value
+    def multiqc_reports = multiqc_report.collect().toList()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/utils_nfcore_quantms_pipeline/main.nf` at line 43, The
current code eagerly calls multiqc_report.toList() and later uses .getVal() in
workflow.onComplete which can block if the channel isn't closed; instead avoid
blocking by not converting to a concrete list up-front: remove the direct
multiqc_reports = multiqc_report.toList() + any .getVal() usage and instead
create a deferred list channel with multiqc_report.toList() (e.g., assign it to
multiqc_reports_ch) and consume it non-blockingly inside workflow.onComplete by
subscribing/consuming that channel (use multiqc_reports_ch.subscribe { list ->
... } or .view/consume to handle the emitted list) so you never call blocking
.getVal() from the event handler and only process the collected reports once the
channel emits the final list.
subworkflows/local/file_preparation/main.nf-94-100 (1)

94-100: ⚠️ Potential issue | 🟠 Major

Inconsistent channel assignment when convert_dotd=true.

When convert_dotd=true, line 97 assigns ch_results by mixing indexed_mzml_bundle with TDF2MZML.out.mzmls_converted. However, when convert_dotd=false, line 99 assigns ch_results = indexed_mzml_bundle, which loses the previous ch_results content (including any MZML_INDEXING outputs from line 76-78).

🔧 Proposed fix - preserve existing results
     // Convert .d files to mzML
     if (params.convert_dotd) {
         TDF2MZML( ch_branched_input.dotd )
         ch_versions = ch_versions.mix(TDF2MZML.out.versions)
-        ch_results = indexed_mzml_bundle.mix(TDF2MZML.out.mzmls_converted)
+        ch_results = ch_results.mix(TDF2MZML.out.mzmls_converted)
     } else {
-        ch_results = indexed_mzml_bundle
+        // ch_results already contains indexed mzMLs and raw conversions
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@subworkflows/local/file_preparation/main.nf` around lines 94 - 100, The
branch overwrites ch_results instead of preserving previously accumulated
results; update the logic so both branches merge into the existing ch_results
channel: when params.convert_dotd is true, mix the prior ch_results with
indexed_mzml_bundle and TDF2MZML.out.mzmls_converted (e.g., ch_results =
ch_results.mix(indexed_mzml_bundle, TDF2MZML.out.mzmls_converted)), and when
false, do ch_results = ch_results.mix(indexed_mzml_bundle) (or initialize
ch_results to indexed_mzml_bundle only if ch_results is not yet defined). Target
ch_results, indexed_mzml_bundle, and TDF2MZML to preserve MZML_INDEXING outputs.
workflows/quantmsdiann.nf-90-95 (1)

90-95: ⚠️ Potential issue | 🟠 Major

DIA-only runs will hang at lines 90–95 due to empty channel blocking.

When running with only DIA samples (no ISO/LFQ), both ch_meta_config_iso and ch_meta_config_lfq are empty. Calling .first() on the mixed empty channels will cause Nextflow to block indefinitely or fail. While DIA samples are routed to FILE_PREPARATION, they are excluded from the decoy generation logic entirely, preventing the workflow from completing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 90 - 95, The current pipeline uses
CREATE_INPUT_CHANNEL.out.ch_meta_config_iso.mix(...).first() which blocks when
both ch_meta_config_iso and ch_meta_config_lfq are empty; instead add a
conditional that checks whether both CREATE_INPUT_CHANNEL.out.ch_meta_config_iso
and CREATE_INPUT_CHANNEL.out.ch_meta_config_lfq are empty and, if so, emit a
single null into ch_db_for_decoy_creation_or_null (so downstream decoy logic
receives a nullable channel), otherwise run the existing mix(...).first() |
combine(ch_db_for_decoy_creation) | map { item -> item[-1] } | set {
ch_db_for_decoy_creation_or_null } pipeline; reference the channel names
CREATE_INPUT_CHANNEL.out.ch_meta_config_iso,
CREATE_INPUT_CHANNEL.out.ch_meta_config_lfq, ch_db_for_decoy_creation and the
output set { ch_db_for_decoy_creation_or_null } when implementing the
conditional.

Comment on lines +63 to +74
run: |
nf-test test \
--profile=+${{ inputs.profile }} \
$(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
--ci \
--changed-since HEAD^ \
--verbose \
--tap=test.tap \
--shard ${{ inputs.shard }}/${{ inputs.total_shards }}

# Save the absolute path of the test.tap file to the output
echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Output capture is unreachable - placed outside the script block.

Lines 73-74 contain shell commands that appear after the nf-test test command but are indented as comments. The echo command to set tap_file_path will never execute because it's outside the run block's effective script.

🔧 Proposed fix - move output capture inside the run block
     - name: Run nf-test
       shell: bash
       env:
         NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
       run: |
         nf-test test \
           --profile=+${{ inputs.profile }} \
           $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
           --ci \
           --changed-since HEAD^ \
           --verbose \
           --tap=test.tap \
           --shard ${{ inputs.shard }}/${{ inputs.total_shards }}
-
-          # Save the absolute path of the test.tap file to the output
-          echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT
+        
+        # Save the absolute path of the test.tap file to the output
+        echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/nf-test/action.yml around lines 63 - 74, The echo that sets
tap_file_path is currently outside the executable run script and thus never
runs; move the echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT line
so it is inside the same run: | script block immediately after the nf-test test
... --tap=test.tap command (i.e., place it directly after the command, properly
indented) so that the realpath test.tap call executes and the output is appended
to $GITHUB_OUTPUT.

Comment on lines +74 to +76
name: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results
include-hidden-files: true
path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/diann_private.yml | head -100

Repository: bigbio/quantmsdiann

Length of output: 3242


Replace matrix.* references with env.* variables in artifact upload steps.

This job has no strategy.matrix defined, so matrix.test_profile and matrix.exec_profile are undefined and will cause expression evaluation to fail. Use the environment variables env.TEST_PROFILE and env.EXEC_PROFILE instead (already defined at lines 28–29 and correctly used at line 65).

Fix
-          name: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results
+          name: ${{ env.TEST_PROFILE }}_${{ env.EXEC_PROFILE }}_results
@@
-          path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results
+          path: ${{ env.TEST_PROFILE }}_${{ env.EXEC_PROFILE }}_results
@@
-          name: nextflow_${{ matrix.test_profile }}_${{ matrix.exec_profile }}.log
+          name: nextflow_${{ env.TEST_PROFILE }}_${{ env.EXEC_PROFILE }}.log

Also applies to: Line 83

🧰 Tools
🪛 actionlint (1.7.11)

[error] 74-74: property "test_profile" is not defined in object type {}

(expression)


[error] 76-76: property "test_profile" is not defined in object type {}

(expression)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/diann_private.yml around lines 74 - 76, The artifact
upload step is using undefined matrix variables (matrix.test_profile and
matrix.exec_profile) causing evaluation failures; replace those with the
environment variables env.TEST_PROFILE and env.EXEC_PROFILE used elsewhere.
Update the artifact fields (name and path) that currently reference
matrix.test_profile and matrix.exec_profile to use ${{ env.TEST_PROFILE }} and
${{ env.EXEC_PROFILE }} (and leave include-hidden-files unchanged), and make the
same change for the second upload block that mirrors these fields so both
uploads use env.TEST_PROFILE/env.EXEC_PROFILE instead of matrix.*.

Comment thread .github/workflows/linting.yml Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (6)
workflows/quantmsdiann.nf (5)

65-69: Non-DIA files are silently dropped

The branch operation only captures items where acquisition_method.contains("dia"). Files with other acquisition methods are silently discarded. Consider adding a warning log or using a second branch (e.g., other) that logs skipped files to help users diagnose issues when their expected files aren't processed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 65 - 69, The current branch on
FILE_PREPARATION.out.results only selects items where
item[0].acquisition_method.contains("dia") and silently drops all others; update
the branch logic to also handle non-DIA items by adding a second branch (e.g.,
.branch { other -> !item[0].acquisition_method.contains("dia") } or similar)
that captures/skips those files and emits a warning (log or println) with the
filename/ID so users know which files were skipped; ensure ch_fileprep_result
remains the DIA channel and the new channel (e.g., ch_fileprep_other) carries
the skipped items for diagnostics or logging.

73-76: Unused channels ch_ids_pmultiqc and ch_consensus_pmultiqc

These channels are initialized but never populated with data before being collected into multiqc_inputs. They will always be empty. If these are placeholders for future features, add a TODO comment. Otherwise, remove them to reduce confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 73 - 76, The channels ch_ids_pmultiqc
and ch_consensus_pmultiqc are created but never populated before being included
in multiqc_inputs; either remove their declarations and any references in
multiqc_inputs to avoid always-empty channels, or mark them as intentional
placeholders by adding a TODO comment above their declarations explaining the
future plan and where they will be populated (e.g., "TODO: populate
ch_ids_pmultiqc with per-sample ID summaries and ch_consensus_pmultiqc with
consensus PMultiQC data when feature X is implemented"); update any code that
assembles multiqc_inputs to match the chosen approach so there are no unused
empty channels.

34-35: Address TODO: Establish naming convention for version channel

The TODO asks about the standard naming: ch_versions vs ch_software_versions. For consistency with nf-core conventions, ch_versions is typically used.

Would you like me to open an issue to track standardizing version channel naming across the workflow?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 34 - 35, The TODO about naming the
versions channel should be resolved by adopting the nf-core convention: keep the
channel named ch_versions, remove the TODO, and replace any uses of
ch_software_versions (or alternate names) with ch_versions to ensure
consistency; update or add a one-line comment near the ch_versions declaration
noting it follows nf-core naming, and run a repo-wide search for channel names
to rename any mismatches (references: ch_versions).

105-106: Defensive null filtering with unclear root cause

The comment indicates null values appear from subworkflows for "unknown reason." While the filter is a valid safeguard, consider investigating the root cause. Null emission typically indicates an issue with channel wiring or conditional logic in subworkflows.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 105 - 106, ch_versions.filter
removing nulls is a defensive workaround; instead locate the producer
subworkflow that emits into ch_versions and fix its output so it never emits
null (ensure the subworkflow always emits a defined value or emits nothing). Add
a short diagnostic log/emit in that subworkflow (or wrap its call) to capture
when it would produce null so you can reproduce and fix the conditional logic or
channel wiring; only keep filtering as a last-resort safety. Specifically,
search for the subworkflow call that feeds ch_versions, add
validation/early-return there to prevent null emissions, and add a diagnostic
message when a null would have been produced so you can trace the root cause.

134-140: Inconsistent channel collection pattern

The channel operations use inconsistent patterns:

  • ch_pipeline_results.ifEmpty([]) vs ch_multiqc_files.collect() vs ch_ids_pmultiqc.collect().ifEmpty([])

When mixing channels, using .collect().ifEmpty([]) consistently ensures each source contributes a single collected item (or empty list). Without .collect() on ch_pipeline_results and ch_msstats_in, individual items are mixed separately which may cause unexpected behavior in the final .collect().

♻️ Consider consistent pattern
     multiqc_inputs = CREATE_INPUT_CHANNEL.out.ch_expdesign
-        .mix(ch_pipeline_results.ifEmpty([]))
+        .mix(ch_pipeline_results.collect().ifEmpty([]))
         .mix(ch_multiqc_files.collect())
         .mix(ch_ids_pmultiqc.collect().ifEmpty([]))
         .mix(ch_consensus_pmultiqc.collect().ifEmpty([]))
-        .mix(ch_msstats_in.ifEmpty([]))
+        .mix(ch_msstats_in.collect().ifEmpty([]))
         .collect()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 134 - 140, The mix of channels into
multiqc_inputs uses inconsistent collection patterns; make each mixed source
produce a single collected item or an empty list by calling
.collect().ifEmpty([]) on ch_pipeline_results and ch_msstats_in and ensure
ch_multiqc_files also uses .collect().ifEmpty([]), e.g. use
mix(ch_pipeline_results.collect().ifEmpty([])),
mix(ch_multiqc_files.collect().ifEmpty([])),
mix(ch_ids_pmultiqc.collect().ifEmpty([])),
mix(ch_consensus_pmultiqc.collect().ifEmpty([])), and
mix(ch_msstats_in.collect().ifEmpty([])) so multiqc_inputs and
CREATE_INPUT_CHANNEL.out.ch_expdesign behave consistently.
nextflow.config (1)

379-385: Complex conditional logic is hard to maintain

The config loading conditions are correct but difficult to read. Consider extracting to a helper function or adding a clarifying comment explaining the logic: "Load config unless offline AND using a remote URL".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow.config` around lines 379 - 385, Extract the complex conditional into
a clearly named boolean and use it in the includeConfig calls: compute a
variable (e.g., loadCustomConfig) that evaluates params.custom_config_base &&
(!System.getenv('NXF_OFFLINE') ||
!params.custom_config_base.startsWith('http')), then replace the inline
condition in both includeConfig statements with that variable; alternatively add
a concise clarifying comment above the includeConfig lines stating "Load config
unless offline AND using a remote URL" to document the intent. Ensure you
reference the existing symbols params.custom_config_base,
System.getenv('NXF_OFFLINE'), params.custom_config_base.startsWith('http'), and
the two includeConfig calls when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nextflow.config`:
- Around line 254-261: Remove the duplicated parameter definition for
config_profile_description: locate both occurrences of the
config_profile_description assignment in the shown diff and delete one of them
so the parameter is defined only once (keep the intended value or the later one
if that's preferred); ensure no other duplicates remain among related parameters
like config_profile_name/contact/url to avoid silent overrides.
- Around line 363-369: The test profile entries referencing includeConfig
'conf/tests/test_lfq.config' (profile name: test) and
'conf/tests/test_full_lfq.config' (profile name: test_full) point to missing
files; either add the missing files under conf/tests (test_lfq.config and
test_full_lfq.config) or update those includeConfig lines to reference existing
configs (for example replace with 'conf/tests/test_dia.config' and/or
'conf/tests/test_full_dia.config') so the includeConfig calls in the test and
test_full profiles resolve at runtime.
- Around line 437-495: The manifest block contains a duplicated homePage key and
a mismatch between manifest name and the homepage URL: remove the duplicate
homePage entry so only one homePage remains, and make the manifest.name
('bigbio/quantms' in the manifest block) and the remaining homePage value
consistent (either change manifest.name to 'bigbio/quantmsdiann' or update
homePage to point to the 'quantms' repo) so the manifest.name and homePage refer
to the same repository.

In `@workflows/quantmsdiann.nf`:
- Around line 40-42: The INPUT_CHECK call uses file(params.input) which doesn't
verify existence; update the argument to file(params.input, checkIfExists: true)
so INPUT_CHECK performs the same existence validation as used elsewhere (see the
other file(..., checkIfExists: true) usage) and fails early with a clear error;
update the INPUT_CHECK invocation that references file(params.input)
accordingly.
- Around line 89-94: Remove the dead channel construction for
ch_db_for_decoy_creation_or_null: delete the pipeline that mixes
CREATE_INPUT_CHANNEL.out.ch_meta_config_iso with
CREATE_INPUT_CHANNEL.out.ch_meta_config_lfq, combines with
ch_db_for_decoy_creation, maps to item[-1] and sets
ch_db_for_decoy_creation_or_null (the block starting with
CREATE_INPUT_CHANNEL.out.ch_meta_config_iso.mix(...) and the subsequent
combine/map/set). The DIA subworkflow only needs ch_fileprep_result.dia and
ch_expdesign and reads the database from params.database, so remove this unused
channel declaration and any unused variables referencing
ch_db_for_decoy_creation_or_null (leave ch_db_for_decoy_creation intact if used
elsewhere).

---

Nitpick comments:
In `@nextflow.config`:
- Around line 379-385: Extract the complex conditional into a clearly named
boolean and use it in the includeConfig calls: compute a variable (e.g.,
loadCustomConfig) that evaluates params.custom_config_base &&
(!System.getenv('NXF_OFFLINE') ||
!params.custom_config_base.startsWith('http')), then replace the inline
condition in both includeConfig statements with that variable; alternatively add
a concise clarifying comment above the includeConfig lines stating "Load config
unless offline AND using a remote URL" to document the intent. Ensure you
reference the existing symbols params.custom_config_base,
System.getenv('NXF_OFFLINE'), params.custom_config_base.startsWith('http'), and
the two includeConfig calls when making the change.

In `@workflows/quantmsdiann.nf`:
- Around line 65-69: The current branch on FILE_PREPARATION.out.results only
selects items where item[0].acquisition_method.contains("dia") and silently
drops all others; update the branch logic to also handle non-DIA items by adding
a second branch (e.g., .branch { other ->
!item[0].acquisition_method.contains("dia") } or similar) that captures/skips
those files and emits a warning (log or println) with the filename/ID so users
know which files were skipped; ensure ch_fileprep_result remains the DIA channel
and the new channel (e.g., ch_fileprep_other) carries the skipped items for
diagnostics or logging.
- Around line 73-76: The channels ch_ids_pmultiqc and ch_consensus_pmultiqc are
created but never populated before being included in multiqc_inputs; either
remove their declarations and any references in multiqc_inputs to avoid
always-empty channels, or mark them as intentional placeholders by adding a TODO
comment above their declarations explaining the future plan and where they will
be populated (e.g., "TODO: populate ch_ids_pmultiqc with per-sample ID summaries
and ch_consensus_pmultiqc with consensus PMultiQC data when feature X is
implemented"); update any code that assembles multiqc_inputs to match the chosen
approach so there are no unused empty channels.
- Around line 34-35: The TODO about naming the versions channel should be
resolved by adopting the nf-core convention: keep the channel named ch_versions,
remove the TODO, and replace any uses of ch_software_versions (or alternate
names) with ch_versions to ensure consistency; update or add a one-line comment
near the ch_versions declaration noting it follows nf-core naming, and run a
repo-wide search for channel names to rename any mismatches (references:
ch_versions).
- Around line 105-106: ch_versions.filter removing nulls is a defensive
workaround; instead locate the producer subworkflow that emits into ch_versions
and fix its output so it never emits null (ensure the subworkflow always emits a
defined value or emits nothing). Add a short diagnostic log/emit in that
subworkflow (or wrap its call) to capture when it would produce null so you can
reproduce and fix the conditional logic or channel wiring; only keep filtering
as a last-resort safety. Specifically, search for the subworkflow call that
feeds ch_versions, add validation/early-return there to prevent null emissions,
and add a diagnostic message when a null would have been produced so you can
trace the root cause.
- Around line 134-140: The mix of channels into multiqc_inputs uses inconsistent
collection patterns; make each mixed source produce a single collected item or
an empty list by calling .collect().ifEmpty([]) on ch_pipeline_results and
ch_msstats_in and ensure ch_multiqc_files also uses .collect().ifEmpty([]), e.g.
use mix(ch_pipeline_results.collect().ifEmpty([])),
mix(ch_multiqc_files.collect().ifEmpty([])),
mix(ch_ids_pmultiqc.collect().ifEmpty([])),
mix(ch_consensus_pmultiqc.collect().ifEmpty([])), and
mix(ch_msstats_in.collect().ifEmpty([])) so multiqc_inputs and
CREATE_INPUT_CHANNEL.out.ch_expdesign behave consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d894318c-5675-4146-9130-cb55fea19f7b

📥 Commits

Reviewing files that changed from the base of the PR and between 5ca9570 and 0b59869.

📒 Files selected for processing (2)
  • nextflow.config
  • workflows/quantmsdiann.nf

Comment thread nextflow.config Resolved
Comment thread nextflow.config Resolved
Comment thread nextflow.config Resolved
Comment thread workflows/quantmsdiann.nf
Comment on lines +40 to +42
INPUT_CHECK(
file(params.input)
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add checkIfExists: true for input file validation

file(params.input) does not validate that the file exists. Use file(params.input, checkIfExists: true) for consistency with line 82 and to fail early with a clear error message.

🔧 Proposed fix
     INPUT_CHECK(
-        file(params.input)
+        file(params.input, checkIfExists: true)
     )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
INPUT_CHECK(
file(params.input)
)
INPUT_CHECK(
file(params.input, checkIfExists: true)
)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/quantmsdiann.nf` around lines 40 - 42, The INPUT_CHECK call uses
file(params.input) which doesn't verify existence; update the argument to
file(params.input, checkIfExists: true) so INPUT_CHECK performs the same
existence validation as used elsewhere (see the other file(..., checkIfExists:
true) usage) and fails early with a clear error; update the INPUT_CHECK
invocation that references file(params.input) accordingly.

Comment thread workflows/quantmsdiann.nf Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

♻️ Duplicate comments (2)
nextflow.config (2)

134-140: ⚠️ Potential issue | 🟡 Minor

Remove duplicated config_profile_description assignment.

config_profile_description is defined at both Line 135 and Line 139; the second silently overrides the first.

Proposed fix
     config_profile_name        = null
     config_profile_description = null

     custom_config_version      = 'master'
     custom_config_base         = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
-    config_profile_description = null
     config_profile_contact     = null
     config_profile_url         = null
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow.config` around lines 134 - 140, Remove the duplicate assignment of
the variable config_profile_description: keep a single declaration (preserve the
intended value or null) and delete the second occurrence so it no longer
silently overrides the first; update any nearby comments or grouping for clarity
around config_profile_name, config_profile_description, config_profile_contact,
and custom_config_* to keep related config keys together.

315-366: ⚠️ Potential issue | 🟡 Minor

Fix duplicated homePage and repository identity mismatch in manifest.

homePage is set twice (Line 316 and Line 365), and manifest.name (Line 315) points to bigbio/quantms while homepage points to quantmsdiann.

Proposed fix
 manifest {
-    name            = 'bigbio/quantms'
-    homePage        = 'https://github.com/bigbio/quantmsdiann'
+    name            = 'bigbio/quantmsdiann'
     contributors    = [
         ...
     ]
     homePage        = 'https://github.com/bigbio/quantmsdiann'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow.config` around lines 315 - 366, manifest has inconsistent repository
identity and a duplicated homePage entry: remove the duplicate homePage and make
the manifest.name and homePage refer to the same repository; specifically,
update manifest.name (currently 'bigbio/quantms') and the single remaining
homePage to match the actual repo (e.g., set manifest.name to
'bigbio/quantmsdiann' and keep homePage 'https://github.com/bigbio/quantmsdiann'
or conversely change homePage to match 'bigbio/quantms'), then delete the
redundant homePage line so only one homePage key exists.
🧹 Nitpick comments (3)
nextflow_schema.json (1)

323-323: Consider renaming DIA-NN definition key to avoid hyphen.

The definition key "DIA-NN" contains a hyphen, which is valid JSON but can cause issues with some JSON Schema tooling and makes JSON Pointer references less intuitive (#/$defs/DIA-NN). Consider using an underscore or camelCase (e.g., "DIA_NN" or "diann") for consistency with other keys in $defs.

Also applies to: 741-743

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow_schema.json` at line 323, Rename the definition key "DIA-NN" to a
hyphen-free name (e.g., "DIA_NN" or "diann") in the schema $defs and update
every schema reference that points to it (any "$ref": "#/$defs/DIA-NN") to the
new JSON Pointer (e.g., "#/$defs/DIA_NN"); ensure you also update the duplicate
occurrences mentioned (the other definition block and any cross-references
around lines 741-743) and any external consumers/tests/configs that reference
"DIA-NN" so all references remain consistent.
nextflow.config (1)

114-114: Keep skip_table_plots default aligned with schema.

Line 114 sets skip_table_plots = false, but nextflow_schema.json (Lines 668-672) does not declare a default for this param. This causes schema-driven help/validation output to drift from runtime defaults.

Proposed fix (in nextflow_schema.json)
 "skip_table_plots": {
     "type": "boolean",
     "description": "Skip protein/peptide table plots with pmultiqc for large dataset.",
-    "fa_icon": "fas fa-toggle-on"
+    "fa_icon": "fas fa-toggle-on",
+    "default": false
 },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow.config` at line 114, The runtime default for skip_table_plots is set
to false in nextflow.config but the JSON schema (nextflow_schema.json) lacks a
corresponding default, causing mismatch; update the schema entry for the
skip_table_plots property to include "default": false (and ensure the property
name matches exactly "skip_table_plots") so help/validation output aligns with
the runtime setting.
modules/local/pmultiqc/main.nf (1)

20-22: Variable names are misleading—they enable features, not disable them.

The variable names suggest disabling functionality, but they actually add flags that enable features:

  • disable_pmultiqc adds --quantms_plugin when enable_pmultiqc is true (enables the plugin)
  • disable_table_plots adds --disable_table when skip_table_plots is true
  • disable_idxml_index adds --ignored_idxml when pmultiqc_idxml_skip is true

Consider renaming for clarity:

♻️ Proposed fix for variable naming
-    def disable_pmultiqc = (params.enable_pmultiqc) ? "--quantms_plugin" : ""
-    def disable_table_plots = (params.enable_pmultiqc) && (params.skip_table_plots) ? "--disable_table" : ""
-    def disable_idxml_index = (params.enable_pmultiqc) && (params.pmultiqc_idxml_skip) ? "--ignored_idxml" : ""
+    def quantms_plugin_flag = (params.enable_pmultiqc) ? "--quantms_plugin" : ""
+    def skip_table_flag = (params.enable_pmultiqc) && (params.skip_table_plots) ? "--disable_table" : ""
+    def skip_idxml_flag = (params.enable_pmultiqc) && (params.pmultiqc_idxml_skip) ? "--ignored_idxml" : ""

Then update references in the script block accordingly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/local/pmultiqc/main.nf` around lines 20 - 22, The three variable
names are misleading—rename disable_pmultiqc, disable_table_plots, and
disable_idxml_index to reflect that they enable flags (e.g., pmultiqc_flag or
quantms_plugin_flag, table_plots_disable_flag, idxml_ignore_flag) and update
every use in the script block accordingly; specifically change where def
disable_pmultiqc = (params.enable_pmultiqc) ? "--quantms_plugin" : "" to a
clearly named variable like quantms_plugin_flag, rename disable_table_plots to
table_disable_flag (or similar) for (params.enable_pmultiqc) &&
(params.skip_table_plots) ? "--disable_table" : "", and rename
disable_idxml_index to idxml_ignored_flag for (params.enable_pmultiqc) &&
(params.pmultiqc_idxml_skip) ? "--ignored_idxml" : "" and replace all references
to the old names elsewhere in the file to the new names.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/usage.md`:
- Around line 81-86: Add a concrete migration mapping table under the "Migrating
from luciphor** to onsite** parameters (Version 1.7.0)" section: list each old
luciphor_* parameter name and its corresponding new onsite_* name (including any
changed default values or units), include notes for parameters that map to
multiple onsite_* options (e.g., algorithm-specific switches like
AScore/PhosphoRS/LucXor), and ensure the table references the old prefix
"luciphor_*" and new prefix "onsite_*" so users can directly translate their
config files; update any surrounding text to call out breaking changes and
examples of a before/after config snippet.
- Around line 218-255: Replace the viral genomics-specific example (references
to Pangolin, PANGOLIN, and nf-core/viralrecon) with proteomics-relevant tools
used by this pipeline; update the descriptive text and all example blocks (the
"PANGOLIN" withName examples and Docker/Singularity/Conda snippets) to use real
quantms tools such as DIANN, OpenMS, MSstats or another pipeline-specific tool
name (e.g., replace occurrences of "Pangolin"/"PANGOLIN" and the
nf-core/viralrecon link with the chosen proteomics tool and its appropriate
container/conda identifiers), and ensure the NB note remains valid for the new
example.
- Around line 159-215: Replace the rnaseq/STAR_ALIGN-centric troubleshooting
example with quantms-specific examples: swap the STAR_ALIGN process name and the
full selector `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN` for real quantms
process names (e.g., `DIANN`, `MSstats`, or OpenMS module process names used in
quantms), update the narrative and command snippets to reflect a typical quantms
failure (OOM or killed) and show the equivalent custom config using the quantms
full process selector (e.g., `withName: 'QUANTMS:DIANN:DIANN_SEARCH'` or the
actual quantms full names), and keep the replication tip (`bash .command.run`)
and advice about using `-c`/resource flags consistent with quantms parameters;
ensure all links and references pointing to nf-core/rnaseq are replaced with the
corresponding quantms repo/files and correct label/default-resource values.
- Line 119: Replace the misspelled word "enviroment" with the correct spelling
"environment" in the sentence that reads "dependent on the computer enviroment"
so the sentence becomes "...dependent on the computer environment."; update only
the single word and keep the surrounding sentence unchanged.
- Line 192: Replace the misspelled word "Therefor" with "Therefore" in the
guidance paragraph that references pipeline resource flags (mentions
`--max_cpus`, `--max_memory`, `--max_time` and example `--max_memory 200GB
-resume`), and while there update nearby grammar: change "you than can try" to
"you can then try" and "increase the resource for the parameters" to "increase
the resources for the parameters" to keep the sentence correct and consistent.
- Line 83: Replace the incorrect asterisk-escaped parameter names in the heading
by fixing the formatting for "luciphor*\*" and "onsite*\*" to the correct
parameter-style names "luciphor_*" and "onsite_*" so the title reads "Migrating
from luciphor_* to onsite_* parameters (Version 1.7.0)"; locate the occurrence
of the header text containing "luciphor*\*" and "onsite*\*" and update those
exact symbols accordingly.
- Line 137: The Markdown code span contains a leading space in the Nextflow
version string (` 24.03.0-edge`) which breaks formatting; edit the sentence
containing "requires Nextflow ` 24.03.0-edge` or later" and remove the leading
space so the code span reads `24.03.0-edge` (i.e., change ` 24.03.0-edge` →
`24.03.0-edge`) to fix the code span formatting.
- Around line 64-69: The params.yaml example currently includes a
genomics-specific key (genome: 'GRCh37') that doesn't belong in the proteomics
pipeline; update the example in params.yaml to replace the genome key with
proteomics-relevant parameters (e.g., database:
'/path/to/protein_database.fasta') and ensure other fields reflect proteomics
usage (input, outdir remain valid). Locate the YAML block titled "params.yaml"
and change the 'genome' entry to a 'database' entry (or another
proteomics-specific key) with a placeholder path, keeping formatting consistent
with the surrounding example.

In `@modules/local/pmultiqc/main.nf`:
- Around line 8-10: The process input signature in
modules/local/pmultiqc/main.nf currently declares path 'results/*' and path
quantms_log but modules/local/pmultiqc/meta.yml documents inputs expdesign,
mzmls, quantms_results, raw_ids; fix by making the implementation and metadata
match: either (A) rename and expand the process inputs in main.nf to exactly
provide inputs expdesign, mzmls, quantms_results, raw_ids (with appropriate
types: path, file, or list) and update any references in the process body to use
those variable names, or (B) update meta.yml to list the actual inputs used
(results and quantms_log) with correct descriptions and types; ensure the chosen
names (e.g., quantms_results vs results/*) are consistent between main.nf and
meta.yml so linters and users see a single interface.
- Around line 26-32: Remove or guard the debug artifacts: disable or remove the
global tracing (the set -x) and the debugging listing (ls -lcth *) and make the
cat of results/*openms_design.tsv safe so it won’t fail under set -e;
specifically, either remove the set -x, remove the ls command, and replace the
direct cat invocation (from the cat results/*openms_design.tsv line) with a
conditional check that the file(s) exist before reading (or use a safe fallback
like skipping when no matches) so the process won’t abort when
results/*openms_design.tsv is absent.
- Around line 45-48: The heredoc that writes versions.yml currently invokes an
invalid flag with multiqc; update the command used inside the heredoc (the line
containing pmultiqc: \$(multiqc --pmultiqc_version | ...)) to run a valid
version lookup for pmultiqc (for example using pip show pmultiqc or a python
one-liner that imports pmultiqc and prints pmultiqc.__version__) so the
generated pmultiqc value is correct; keep the surrounding heredoc and
"${task.process}" key intact and only replace the command substitution to a
working version-extraction command.

In `@nextflow_schema.json`:
- Around line 360-366: The schema property "pg_level" is declared as type
"number" but its enum contains integer values [0,1,2]; change the "type" for the
pg_level property to "integer" (preserving the "description", "fa_icon", "enum"
and "default" fields) so validation enforces integer-only values.
- Around line 420-421: Fix the typos in the JSON schema property description:
change "insted" to "instead" and "concensus" to "consensus" in the description
string (the "description" field shown alongside "fa_icon": "fas fa-forward");
ensure the updated sentence reads correctly (e.g., "Skip the preliminary
analysis step, thus use the passed spectral library as-is instead of generating
a local consensus library.") so semantics and punctuation remain intact.
- Around line 698-702: The fa_icon value for the trace_report_suffix schema
property is using an incorrect Font Awesome class ("far calendar"); update the
fa_icon value to the proper class name by adding the missing prefix so it reads
"far fa-calendar" on the trace_report_suffix property to match the naming
convention used elsewhere.
- Around line 473-478: The "statistical_post_processing" schema object currently
has an invalid default (a descriptive string); update the schema by moving the
descriptive text into the "description" field (or appending it to the existing
description) and change "default" to a valid JSON object (e.g., {} or a
representative default object with the expected properties) so the
"statistical_post_processing" object type has a correct default value.

In `@nextflow.config`:
- Line 368: The defaultBranch metadata is stale: update the defaultBranch value
in nextflow.config from 'master' to 'main' so the manifest matches the PR
target; edit the defaultBranch assignment (symbol: defaultBranch) to use 'main'
and save the file.

---

Duplicate comments:
In `@nextflow.config`:
- Around line 134-140: Remove the duplicate assignment of the variable
config_profile_description: keep a single declaration (preserve the intended
value or null) and delete the second occurrence so it no longer silently
overrides the first; update any nearby comments or grouping for clarity around
config_profile_name, config_profile_description, config_profile_contact, and
custom_config_* to keep related config keys together.
- Around line 315-366: manifest has inconsistent repository identity and a
duplicated homePage entry: remove the duplicate homePage and make the
manifest.name and homePage refer to the same repository; specifically, update
manifest.name (currently 'bigbio/quantms') and the single remaining homePage to
match the actual repo (e.g., set manifest.name to 'bigbio/quantmsdiann' and keep
homePage 'https://github.com/bigbio/quantmsdiann' or conversely change homePage
to match 'bigbio/quantms'), then delete the redundant homePage line so only one
homePage key exists.

---

Nitpick comments:
In `@modules/local/pmultiqc/main.nf`:
- Around line 20-22: The three variable names are misleading—rename
disable_pmultiqc, disable_table_plots, and disable_idxml_index to reflect that
they enable flags (e.g., pmultiqc_flag or quantms_plugin_flag,
table_plots_disable_flag, idxml_ignore_flag) and update every use in the script
block accordingly; specifically change where def disable_pmultiqc =
(params.enable_pmultiqc) ? "--quantms_plugin" : "" to a clearly named variable
like quantms_plugin_flag, rename disable_table_plots to table_disable_flag (or
similar) for (params.enable_pmultiqc) && (params.skip_table_plots) ?
"--disable_table" : "", and rename disable_idxml_index to idxml_ignored_flag for
(params.enable_pmultiqc) && (params.pmultiqc_idxml_skip) ? "--ignored_idxml" :
"" and replace all references to the old names elsewhere in the file to the new
names.

In `@nextflow_schema.json`:
- Line 323: Rename the definition key "DIA-NN" to a hyphen-free name (e.g.,
"DIA_NN" or "diann") in the schema $defs and update every schema reference that
points to it (any "$ref": "#/$defs/DIA-NN") to the new JSON Pointer (e.g.,
"#/$defs/DIA_NN"); ensure you also update the duplicate occurrences mentioned
(the other definition block and any cross-references around lines 741-743) and
any external consumers/tests/configs that reference "DIA-NN" so all references
remain consistent.

In `@nextflow.config`:
- Line 114: The runtime default for skip_table_plots is set to false in
nextflow.config but the JSON schema (nextflow_schema.json) lacks a corresponding
default, causing mismatch; update the schema entry for the skip_table_plots
property to include "default": false (and ensure the property name matches
exactly "skip_table_plots") so help/validation output aligns with the runtime
setting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b8d9c64d-3ad5-4337-a1c4-4a2bc76c912c

📥 Commits

Reviewing files that changed from the base of the PR and between 0b59869 and 6f4e705.

📒 Files selected for processing (4)
  • docs/usage.md
  • modules/local/pmultiqc/main.nf
  • nextflow.config
  • nextflow_schema.json

Comment thread docs/usage.md
Comment on lines +64 to +69
```yaml title="params.yaml"
input: './samplesheet.csv'
outdir: './results/'
genome: 'GRCh37'
<...>
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the parameter example to match the proteomics context.

The example shows genome: 'GRCh37', which is a genomics reference inappropriate for a proteomics pipeline. This appears to be copy-pasted from a genomics pipeline template.

📝 Proposed fix with proteomics-relevant parameters
 ```yaml title="params.yaml"
 input: './samplesheet.csv'
 outdir: './results/'
-genome: 'GRCh37'
+database: '/path/to/protein_database.fasta'
 <...>
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/usage.md` around lines 64 - 69, The params.yaml example currently
includes a genomics-specific key (genome: 'GRCh37') that doesn't belong in the
proteomics pipeline; update the example in params.yaml to replace the genome key
with proteomics-relevant parameters (e.g., database:
'/path/to/protein_database.fasta') and ensure other fields reflect proteomics
usage (input, outdir remain valid). Locate the YAML block titled "params.yaml"
and change the 'genome' entry to a 'database' entry (or another
proteomics-specific key) with a placeholder path, keeping formatting consistent
with the surrounding example.

Comment thread docs/usage.md Resolved
Comment thread docs/usage.md

## Migration Guide

### Migrating from luciphor*\* to onsite*\* parameters (Version 1.7.0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the parameter name formatting.

The asterisk formatting in "luciphor**" appears incorrect. It should likely be "luciphor_*" (with underscore) to match typical parameter naming patterns.

✏️ Proposed fix
-### Migrating from luciphor*\* to onsite*\* parameters (Version 1.7.0)
+### Migrating from luciphor_* to onsite_* parameters (Version 1.7.0)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Migrating from luciphor*\* to onsite*\* parameters (Version 1.7.0)
### Migrating from luciphor_* to onsite_* parameters (Version 1.7.0)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/usage.md` at line 83, Replace the incorrect asterisk-escaped parameter
names in the heading by fixing the formatting for "luciphor*\*" and "onsite*\*"
to the correct parameter-style names "luciphor_*" and "onsite_*" so the title
reads "Migrating from luciphor_* to onsite_* parameters (Version 1.7.0)"; locate
the occurrence of the header text containing "luciphor*\*" and "onsite*\*" and
update those exact symbols accordingly.

Comment thread docs/usage.md Resolved
Comment thread docs/usage.md
- `apptainer`
- A generic configuration profile to be used with [Apptainer](https://apptainer.org/)
- `wave`
- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix code span formatting.

Remove the leading space in the version number code span to fix markdown formatting.

📝 Proposed fix
-- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later).
+- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow `24.03.0-edge` or later).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later).
- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow `24.03.0-edge` or later).
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 137-137: Spaces inside code span elements

(MD038, no-space-in-code)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/usage.md` at line 137, The Markdown code span contains a leading space
in the Nextflow version string (` 24.03.0-edge`) which breaks formatting; edit
the sentence containing "requires Nextflow ` 24.03.0-edge` or later" and remove
the leading space so the code span reads `24.03.0-edge` (i.e., change `
24.03.0-edge` → `24.03.0-edge`) to fix the code span formatting.

Comment thread nextflow_schema.json Resolved
Comment thread nextflow_schema.json Resolved
Comment thread nextflow_schema.json
Comment on lines +473 to +478
"statistical_post_processing": {
"title": "Statistical post-processing",
"type": "object",
"description": "",
"default": "Parameters for the R script using MSstats for statistical post processing and quantification visualization.",
"properties": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incorrect default value for object type.

The default field contains a description string instead of a valid default object value. This appears to be a copy-paste error where the description text was placed in the default field instead of the description field.

Proposed fix
         "statistical_post_processing": {
             "title": "Statistical post-processing",
             "type": "object",
-            "description": "",
-            "default": "Parameters for the R script using MSstats for statistical post processing and quantification visualization.",
+            "description": "Parameters for the R script using MSstats for statistical post processing and quantification visualization.",
+            "default": "",
             "properties": {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"statistical_post_processing": {
"title": "Statistical post-processing",
"type": "object",
"description": "",
"default": "Parameters for the R script using MSstats for statistical post processing and quantification visualization.",
"properties": {
"statistical_post_processing": {
"title": "Statistical post-processing",
"type": "object",
"description": "Parameters for the R script using MSstats for statistical post processing and quantification visualization.",
"default": "",
"properties": {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow_schema.json` around lines 473 - 478, The
"statistical_post_processing" schema object currently has an invalid default (a
descriptive string); update the schema by moving the descriptive text into the
"description" field (or appending it to the existing description) and change
"default" to a valid JSON object (e.g., {} or a representative default object
with the expected properties) so the "statistical_post_processing" object type
has a correct default value.

Comment thread nextflow_schema.json Resolved
Comment thread nextflow.config Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
nextflow.config (1)

1-7: Consider updating header comment to reflect repository name.

The header comment references bigbio/quantms (line 3), but this pipeline is quantmsdiann. For consistency with the manifest, consider updating it.

🔧 Proposed fix
 /*
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    bigbio/quantms Nextflow config file
+    bigbio/quantmsdiann Nextflow config file
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Default config options for all compute environments
 ----------------------------------------------------------------------------------------
 */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nextflow.config` around lines 1 - 7, Update the header comment to match the
actual pipeline name: replace the string "bigbio/quantms" in the top comment
block with "bigbio/quantmsdiann" (or the exact repository/pipeline name used in
the manifest) so the header in nextflow.config correctly reflects the project;
locate and edit the comment block containing "bigbio/quantms" to make this
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@nextflow.config`:
- Around line 1-7: Update the header comment to match the actual pipeline name:
replace the string "bigbio/quantms" in the top comment block with
"bigbio/quantmsdiann" (or the exact repository/pipeline name used in the
manifest) so the header in nextflow.config correctly reflects the project;
locate and edit the comment block containing "bigbio/quantms" to make this
change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 308317c7-199e-4463-8dd3-92894e4dff46

📥 Commits

Reviewing files that changed from the base of the PR and between 6f4e705 and 7eb3ee5.

📒 Files selected for processing (2)
  • nextflow.config
  • nextflow_schema.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • nextflow_schema.json

@ypriverol
ypriverol requested review from Copilot and ypriverol March 16, 2026 11:01
@ypriverol
ypriverol changed the base branch from main to dev March 16, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts and assembles a standalone DIA-NN-focused Nextflow pipeline from the broader quantms codebase, bundling the DIA workflow, supporting local modules/subworkflows, and CI/testing scaffolding.

Changes:

  • Added a new QUANTMSDIANN entry workflow and DIA subworkflow wiring for DIANN-based analysis and reporting.
  • Introduced/ported multiple local modules (DIA-NN steps, file prep, MSstats, QC reporting) plus nf-core utility subworkflows.
  • Added nf-test configuration/tests and expanded GitHub Actions workflows for linting and CI execution.

Reviewed changes

Copilot reviewed 131 out of 142 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
workflows/quantmsdiann.nf New top-level workflow orchestrating input validation, file prep, DIA workflow, and reporting.
workflows/dia.nf New DIA workflow wiring DIA-NN modules (cfg, library generation, analyses, MSstats).
tests/nextflow.config nf-test runtime config (test dataset base paths, AWS anonymous).
tests/default.nf.test Snapshot-style nf-test for pipeline execution outputs.
tests/.nftignore Ignores unstable outputs in snapshots (MultiQC artifacts, pipeline_info).
subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json Test schema for nf-schema plugin validation behavior.
subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config Enables nf-schema plugin for subworkflow tests.
subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test nf-test suite for utils_nfschema_plugin subworkflow.
subworkflows/nf-core/utils_nfschema_plugin/meta.yml Metadata for utils_nfschema_plugin subworkflow.
subworkflows/nf-core/utils_nfschema_plugin/main.nf Subworkflow wrapping nf-schema validation and params summary rendering.
subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config Dummy manifest config for nf-core utility subworkflow tests.
subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap Snapshot for utils_nfcore_pipeline workflow tests.
subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test nf-test workflow test for utils_nfcore_pipeline.
subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap Snapshot for utils_nfcore_pipeline function tests.
subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test nf-test function tests for utils_nfcore_pipeline.
subworkflows/nf-core/utils_nfcore_pipeline/meta.yml Metadata for utils_nfcore_pipeline subworkflow.
subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config Dummy manifest config for nextflow utility subworkflow tests.
subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test nf-test workflow tests for utils_nextflow_pipeline.
subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap Snapshot for utils_nextflow_pipeline function tests.
subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test nf-test function tests for utils_nextflow_pipeline.
subworkflows/nf-core/utils_nextflow_pipeline/meta.yml Metadata for utils_nextflow_pipeline subworkflow.
subworkflows/nf-core/utils_nextflow_pipeline/main.nf Utility subworkflow for version printing, param dump, conda channel checks.
subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml Metadata for local pipeline completion utility subworkflow bundle.
subworkflows/local/input_check/meta.yml Metadata for input_check subworkflow.
subworkflows/local/input_check/main.nf Input validation subworkflow (samplesheet check).
subworkflows/local/file_preparation/meta.yml Metadata for file_preparation subworkflow.
subworkflows/local/file_preparation/main.nf File prep subworkflow (decompress/convert/index/stats/peak picking).
subworkflows/local/create_input_channel/meta.yml Metadata for create_input_channel subworkflow.
subworkflows/local/create_input_channel/main.nf Builds meta/config channels from SDRF-derived config TSV.
nf-test.config nf-test runner configuration (profiles, triggers, ignored paths).
modules/nf-core/multiqc/tests/nextflow.config Test config override for MULTIQC module.
modules/nf-core/multiqc/tests/main.nf.test.snap Snapshot outputs for MULTIQC tests.
modules/nf-core/multiqc/tests/main.nf.test nf-test coverage for MULTIQC module (incl. stub).
modules/nf-core/multiqc/tests/custom_prefix.config Test config for MultiQC custom prefix.
modules/nf-core/multiqc/meta.yml Metadata for MultiQC module.
modules/nf-core/multiqc/main.nf MultiQC process definition with container/conda and version capture.
modules/nf-core/multiqc/environment.yml Conda environment for MultiQC module.
modules/local/utils/tdf2mzml/meta.yml Metadata for Bruker .d to mzML conversion module.
modules/local/utils/tdf2mzml/main.nf Bruker .d conversion process implementation.
modules/local/utils/mzml_statistics/meta.yml Metadata for mzML statistics module.
modules/local/utils/mzml_statistics/main.nf Process for mzML stats via quantms-utils container.
modules/local/utils/decompress_dotd/meta.yml Metadata for .d archive decompression module.
modules/local/utils/decompress_dotd/main.nf Decompression process for tar/gz/zip containing .d directories.
modules/local/sdrf_parsing/meta.yml Metadata for SDRF parsing module.
modules/local/sdrf_parsing/main.nf SDRF parsing process using sdrf-pipelines to produce config/design TSVs.
modules/local/samplesheet_check/meta.yml Metadata for samplesheet validation module.
modules/local/samplesheet_check/main.nf Process to normalize CSV/TSV and validate SDRF via quantms-utils.
modules/local/pmultiqc/meta.yml Metadata for pmultiqc reporting module.
modules/local/pmultiqc/main.nf pmultiqc/MultiQC-based reporting process.
modules/local/openms/openms_peak_picker/meta.yml Metadata for OpenMS peak picking module.
modules/local/openms/openms_peak_picker/main.nf OpenMS PeakPickerHiRes process implementation.
modules/local/openms/mzml_indexing/meta.yml Metadata for OpenMS mzML indexing module.
modules/local/openms/mzml_indexing/main.nf OpenMS FileConverter indexing process implementation.
modules/local/msstats/msstats_lfq/meta.yml Metadata for MSstats LFQ downstream analysis module.
modules/local/msstats/msstats_lfq/main.nf MSstats LFQ process implementation and version capture.
modules/local/diann/preliminary_analysis/meta.yml Metadata for DIA-NN preliminary analysis module.
modules/local/diann/preliminary_analysis/main.nf DIA-NN preliminary analysis process with arg stripping and perf flags.
modules/local/diann/insilico_library_generation/meta.yml Metadata for DIA-NN in-silico library generation module.
modules/local/diann/insilico_library_generation/main.nf DIA-NN in-silico library generation process with arg stripping.
modules/local/diann/individual_analysis/meta.yml Metadata for DIA-NN individual analysis module.
modules/local/diann/individual_analysis/main.nf DIA-NN per-file final analysis process with calibration parsing.
modules/local/diann/generate_cfg/meta.yml Metadata for DIA-NN config generation module.
modules/local/diann/generate_cfg/main.nf Process to generate DIA-NN cfg via quantms-utils.
modules/local/diann/final_quantification/meta.yml Metadata for DIA-NN final quantification module.
modules/local/diann/final_quantification/main.nf DIA-NN final quantification process producing report/matrices.
modules/local/diann/diann_msstats/meta.yml Metadata for DIA-NN report → MSstats conversion module.
modules/local/diann/diann_msstats/main.nf Process to convert DIA-NN report to MSstats input via quantms-utils.
modules/local/diann/assemble_empirical_library/meta.yml Metadata for DIA-NN empirical library assembly module.
modules/local/diann/assemble_empirical_library/main.nf Process to assemble empirical library from preliminary .quant files.
modules/bigbio/thermorawfileparser/tests/nextflow.config Test config for thermorawfileparser module publishDir behavior.
modules/bigbio/thermorawfileparser/tests/main.nf.test.snap Snapshot outputs for thermorawfileparser tests.
modules/bigbio/thermorawfileparser/tests/main.nf.test nf-test coverage for thermorawfileparser module (incl. stub).
modules/bigbio/thermorawfileparser/meta.yml Metadata for thermorawfileparser module.
modules/bigbio/thermorawfileparser/main.nf Thermo RAW → mzML conversion process implementation.
modules/bigbio/thermorawfileparser/environment.yml Conda environment for thermorawfileparser module.
modules.json Tracks module/subworkflow sources and pinned git SHAs.
main.nf Pipeline entrypoint wiring QUANTMSDIANN + completion utilities.
conf/wave.config Wave profile overrides for specific containers.
conf/tests/test_latest_dia.config Test profile for latest DIA-NN (docker, private container).
conf/tests/test_full_dia.config Full-size DIA test profile.
conf/tests/test_dia_dotd.config DIA-PASEF .d test profile.
conf/tests/test_dia.config Minimal DIA test profile.
conf/pride_codon_slurm.config SLURM profile config for EMBL-EBI Codon cluster.
conf/modules/verbose_modules.config Verbose publishDir routing for many processes.
conf/modules/shared.config Shared publishDir routing for common outputs (msstats, sdrf, etc.).
conf/modules/dia.config Sets ext.args for DIA-NN modules from params.diann_extra_args.
conf/dev.config Dev profile overrides (nightly OpenMS containers).
conf/base.config Default resource labels and process defaults.
assets/slackreport.json Slack notification template.
assets/sendmail_template.txt Email MIME template with embedded logo/optional MultiQC report.
assets/schema_input.json JSON schema for params.input.
assets/multiqc_config.yml MultiQC configuration and file discovery patterns.
assets/methods_description_template.yml Methods description template for MultiQC report.
assets/email_template.txt Plain-text email notification template.
assets/email_template.html HTML email notification template.
assets/adaptivecard.json MS Teams adaptive card notification template.
CITATIONS.md Consolidated citations for pipeline and tools.
CHANGELOG.md Changelog scaffold for the extracted pipeline.
.prettierrc.yml Prettier configuration.
.prettierignore Prettier ignore list.
.pre-commit-config.yaml Pre-commit hooks for formatting and whitespace fixes.
.nf-core.yml nf-core template metadata and lint configuration.
.github/workflows/template-version-comment.yml Workflow to comment when nf-core template is outdated.
.github/workflows/linting_comment.yml Posts lint results as a PR comment after linting workflow run.
.github/workflows/linting.yml Runs pre-commit + nf-core linting.
.github/workflows/fix_linting.yml Bot workflow to auto-fix linting via PR comment trigger.
.github/workflows/extended_ci.yml Extended CI matrix for docker + singularity across many profiles.
.github/workflows/diann_private.yml Fork-specific CI to run test_latest_dia.
.github/workflows/clean-up.yml Scheduled stale/cleanup automation for tagged issues/PRs.
.github/workflows/ci.yml Core CI for minimal test profiles (docker).
.github/workflows/branch.yml Enforces PR targeting rules for main/master vs dev/patch.
.github/actions/nf-test/action.yml Composite action to run nf-test with common setup and sharding.
.github/actions/get-shards/action.yml Composite action to compute dynamic nf-test shard counts.
.github/PULL_REQUEST_TEMPLATE.md PR checklist template.
.github/ISSUE_TEMPLATE/feature_request.yml Issue template for feature requests.
.github/ISSUE_TEMPLATE/config.yml Issue template config with community links.
.github/ISSUE_TEMPLATE/bug_report.yml Issue template for bug reports.
.github/CONTRIBUTING.md Contribution guidelines and local testing instructions.
.github/.dockstore.yml Dockstore workflow publication configuration.
.gitattributes Linguist configuration for Nextflow and generated paths.
.devcontainer/setup.sh Devcontainer setup (prompt, nextflow self-update, welcome note).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread workflows/dia.nf Resolved
Comment thread workflows/dia.nf Resolved
@ypriverol
ypriverol requested a review from daichengxin March 16, 2026 11:10
@ypriverol
ypriverol self-requested a review March 16, 2026 11:11
@ypriverol
ypriverol merged commit e60641a into bigbio:dev Mar 17, 2026
1 check passed
@yueqixuan
yueqixuan deleted the dev branch March 18, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants