From dbb08888675bc5eba5e377fae013f842c07ed8b8 Mon Sep 17 00:00:00 2001 From: "J. Sebastian Paez" Date: Sun, 5 Jul 2026 20:48:09 -0700 Subject: [PATCH] fix: DSL2 optional-output syntax for Nextflow 25.x + clamp version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nextflow 25.x parses the bareword process-output form `path "" optional true` as `path("").optional(true)`, where the inner call returns null, throwing at script-load/include time: java.lang.NullPointerException: Cannot invoke method optional() on null object at BaseScript.process(BaseScript.groovy:136) Because this fires while parsing an include, one offending module aborts the whole pipeline before any workflow runs — even modules whose paths are never executed. Convert every bareword occurrence to the modern comma+colon form (`, optional: true`) and clamp the required Nextflow version to the runner (25.04+). Files: - modules/local/msstats/main.nf:18 - modules/local/msstatstmt/main.nf:18 - modules/local/openms/proteomicslfq/main.nf:20-27 (8 outputs) - nextflow.config:446 nextflowVersion '!>=23.04.0' -> '!>=25.04.0' Verified with `nextflow inspect main.nf -profile test,docker` on Nextflow 25.10.4: full include graph parses clean (41 processes resolved, no optional() NPE). --- modules/local/msstats/main.nf | 2 +- modules/local/msstatstmt/main.nf | 2 +- modules/local/openms/proteomicslfq/main.nf | 16 ++++++++-------- nextflow.config | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/local/msstats/main.nf b/modules/local/msstats/main.nf index 6e215bb85..290ebfad2 100644 --- a/modules/local/msstats/main.nf +++ b/modules/local/msstats/main.nf @@ -15,7 +15,7 @@ process MSSTATS { output: // The generation of the PDFs from MSstats are very unstable, especially with auto-contrasts. // And users can easily fix anything based on the csv and the included script -> make optional - path "*.pdf" optional true + path "*.pdf", optional: true path "*.csv", emit: msstats_csv path "*.log", emit: log path "versions.yml" , emit: version diff --git a/modules/local/msstatstmt/main.nf b/modules/local/msstatstmt/main.nf index 1d5d7a902..f1cca4b6c 100644 --- a/modules/local/msstatstmt/main.nf +++ b/modules/local/msstatstmt/main.nf @@ -15,7 +15,7 @@ process MSSTATSTMT { output: // The generation of the PDFs from MSstatsTMT are very unstable, especially with auto-contrasts. // And users can easily fix anything based on the csv and the included script -> make optional - path "*.pdf" optional true + path "*.pdf", optional: true path "*.csv", emit: msstats_csv path "*.log" path "versions.yml" , emit: version diff --git a/modules/local/openms/proteomicslfq/main.nf b/modules/local/openms/proteomicslfq/main.nf index f44a4fc41..11a5bc355 100644 --- a/modules/local/openms/proteomicslfq/main.nf +++ b/modules/local/openms/proteomicslfq/main.nf @@ -17,14 +17,14 @@ process PROTEOMICSLFQ { output: path "${expdes.baseName}_openms.mzTab", emit: out_mztab path "${expdes.baseName}_openms.consensusXML", emit: out_consensusXML - path "*msstats_in.csv", emit: out_msstats optional true - path "*triqler_in.tsv", emit: out_triqler optional true - path "debug_mergedIDs.idXML", emit: debug_mergedIDs optional true - path "debug_mergedIDs_inference.idXML", emit: debug_mergedIDs_inference optional true - path "debug_mergedIDsGreedyResolved.idXML", emit: debug_mergedIDsGreedyResolved optional true - path "debug_mergedIDsGreedyResolvedFDR.idXML", emit: debug_mergedIDsGreedyResolvedFDR optional true - path "debug_mergedIDsGreedyResolvedFDRFiltered.idXML", emit: debug_mergedIDsGreedyResolvedFDRFiltered optional true - path "debug_mergedIDsFDRFilteredStrictlyUniqueResolved.idXML", emit: debug_mergedIDsFDRFilteredStrictlyUniqueResolved optional true + path "*msstats_in.csv", emit: out_msstats, optional: true + path "*triqler_in.tsv", emit: out_triqler, optional: true + path "debug_mergedIDs.idXML", emit: debug_mergedIDs, optional: true + path "debug_mergedIDs_inference.idXML", emit: debug_mergedIDs_inference, optional: true + path "debug_mergedIDsGreedyResolved.idXML", emit: debug_mergedIDsGreedyResolved, optional: true + path "debug_mergedIDsGreedyResolvedFDR.idXML", emit: debug_mergedIDsGreedyResolvedFDR, optional: true + path "debug_mergedIDsGreedyResolvedFDRFiltered.idXML", emit: debug_mergedIDsGreedyResolvedFDRFiltered, optional: true + path "debug_mergedIDsFDRFilteredStrictlyUniqueResolved.idXML", emit: debug_mergedIDsFDRFilteredStrictlyUniqueResolved, optional: true path "*.log", emit: log path "versions.yml", emit: version diff --git a/nextflow.config b/nextflow.config index bda2d4809..0144b5c35 100644 --- a/nextflow.config +++ b/nextflow.config @@ -443,7 +443,7 @@ manifest { homePage = 'https://github.com/nf-core/quantms' description = """Quantitative Mass Spectrometry nf-core workflow""" mainScript = 'main.nf' - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=25.04.0' version = '1.2.0' doi = '10.5281/zenodo.7754148' }