From 4987afe46241aa4bf8263e4a1fafd5ce808bd41c Mon Sep 17 00:00:00 2001 From: Adrien Coulier Date: Wed, 10 Dec 2025 14:16:24 +0100 Subject: [PATCH 1/3] Migrate cat/fastq to topic channel --- modules/nf-core/cat/fastq/main.nf | 22 +- modules/nf-core/cat/fastq/meta.yml | 28 ++- .../nf-core/cat/fastq/tests/main.nf.test.snap | 200 ++++++++++++------ 3 files changed, 163 insertions(+), 87 deletions(-) diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index acfb6d0e6221..8480e383f9f5 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -12,7 +12,7 @@ process CAT_FASTQ { output: tuple val(meta), path("*.merged.fastq.gz"), emit: reads - path "versions.yml", emit: versions + tuple val("${task.process}"), val("cat"), eval("cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//'"), emit: versions_cat, topic: versions when: task.ext.when == null || task.ext.when @@ -24,11 +24,6 @@ process CAT_FASTQ { if (readList.size >= 1) { """ cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS """ } else { error("Could not find any FASTQ files to concatenate in the process input") @@ -42,11 +37,6 @@ process CAT_FASTQ { """ cat ${read1.join(' ')} > ${prefix}_1.merged.fastq.gz cat ${read2.join(' ')} > ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS """ } else { error("Could not find any FASTQ file pairs to concatenate in the process input") @@ -60,11 +50,6 @@ process CAT_FASTQ { if (readList.size >= 1) { """ echo '' | gzip > ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS """ } else { error("Could not find any FASTQ files to concatenate in the process input") @@ -75,11 +60,6 @@ process CAT_FASTQ { """ echo '' | gzip > ${prefix}_1.merged.fastq.gz echo '' | gzip > ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS """ } else { error("Could not find any FASTQ file pairs to concatenate in the process input") diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index 40d2f627cec0..8fc03bdc2d14 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -34,13 +34,29 @@ output: description: Merged fastq file pattern: "*.{merged.fastq.gz}" ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index ee5ab364763f..b9a0a1e31c84 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -22,7 +22,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -33,16 +37,20 @@ "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:04.902821069" + "timestamp": "2025-12-10T14:13:10.767693211" }, "test_cat_fastq_paired_end_same_name": { "content": [ @@ -60,7 +68,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -74,16 +86,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:23:57.476357974" + "timestamp": "2025-12-10T14:13:05.75952415" }, "test_cat_fastq_paired_end_same_name - stub": { "content": [ @@ -101,7 +117,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -115,16 +135,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:34.615815265" + "timestamp": "2025-12-10T14:13:31.074181976" }, "test_cat_fastq_single_end": { "content": [ @@ -139,7 +163,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -150,16 +178,20 @@ "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:23:32.489874386" + "timestamp": "2025-12-10T14:12:50.064604665" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -174,7 +206,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -185,16 +221,20 @@ "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:23:49.184759506" + "timestamp": "2025-12-10T14:13:00.83068553" }, "test_cat_fastq_single_end - stub": { "content": [ @@ -209,7 +249,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -220,16 +264,20 @@ "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:12.857293744" + "timestamp": "2025-12-10T14:13:15.60136066" }, "test_cat_fastq_paired_end_no_files": { "content": [ @@ -264,7 +312,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -275,16 +327,20 @@ "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:27.816080065" + "timestamp": "2025-12-10T14:13:25.872173912" }, "test_cat_fastq_paired_end": { "content": [ @@ -302,7 +358,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -316,16 +376,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:23:41.739469187" + "timestamp": "2025-12-10T14:12:55.426710411" }, "test_cat_fastq_single_end_no_files": { "content": [ @@ -353,7 +417,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -367,16 +435,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:21.178950408" + "timestamp": "2025-12-10T14:13:20.642696959" }, "test_cat_fastq_single_end_single_file - stub": { "content": [ @@ -391,7 +463,11 @@ ] ], "1": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ], "reads": [ [ @@ -402,15 +478,19 @@ "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.4" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-02-25T17:24:40.851404993" + "timestamp": "2025-12-10T14:13:35.944630361" } } \ No newline at end of file From a3c1932faf7e82be705284ecdc96f944707864a6 Mon Sep 17 00:00:00 2001 From: Adrien Coulier Date: Wed, 10 Dec 2025 14:37:30 +0100 Subject: [PATCH 2/3] Remove out.versions in related subworkflows --- .../nf-core/fastq_qc_trim_filter_setstrandedness/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf index db839531b7cc..84a029b30754 100644 --- a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf +++ b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf @@ -148,8 +148,6 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ch_fastq.multiple ).reads.mix(ch_fastq.single).set { ch_filtered_reads } - ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first()) - // // MODULE: Lint FastQ files // From 2de9d95c27dfa44094a56a33300457df2778472f Mon Sep 17 00:00:00 2001 From: Adrien Coulier Date: Wed, 10 Dec 2025 14:45:58 +0100 Subject: [PATCH 3/3] Update snapshots (again) --- .../nf-core/cat/fastq/tests/main.nf.test.snap | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index b9a0a1e31c84..e2a94249799d 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -25,7 +25,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -41,7 +41,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -50,7 +50,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:10.767693211" + "timestamp": "2025-12-10T14:31:42.84401526" }, "test_cat_fastq_paired_end_same_name": { "content": [ @@ -71,7 +71,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -90,7 +90,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -99,7 +99,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:05.75952415" + "timestamp": "2025-12-10T14:31:36.820489323" }, "test_cat_fastq_paired_end_same_name - stub": { "content": [ @@ -120,7 +120,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -139,7 +139,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -148,7 +148,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:31.074181976" + "timestamp": "2025-12-10T14:32:06.262192935" }, "test_cat_fastq_single_end": { "content": [ @@ -166,7 +166,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -182,7 +182,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -191,7 +191,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:12:50.064604665" + "timestamp": "2025-12-10T14:31:18.859169785" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -209,7 +209,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -225,7 +225,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -234,7 +234,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:00.83068553" + "timestamp": "2025-12-10T14:31:30.942615287" }, "test_cat_fastq_single_end - stub": { "content": [ @@ -252,7 +252,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -268,7 +268,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -277,7 +277,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:15.60136066" + "timestamp": "2025-12-10T14:31:48.827990633" }, "test_cat_fastq_paired_end_no_files": { "content": [ @@ -315,7 +315,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -331,7 +331,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -340,7 +340,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:25.872173912" + "timestamp": "2025-12-10T14:32:00.586584379" }, "test_cat_fastq_paired_end": { "content": [ @@ -361,7 +361,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -380,7 +380,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -389,7 +389,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:12:55.426710411" + "timestamp": "2025-12-10T14:31:25.159365603" }, "test_cat_fastq_single_end_no_files": { "content": [ @@ -420,7 +420,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -439,7 +439,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -448,7 +448,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:20.642696959" + "timestamp": "2025-12-10T14:31:54.850702874" }, "test_cat_fastq_single_end_single_file - stub": { "content": [ @@ -466,7 +466,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ], "reads": [ @@ -482,7 +482,7 @@ [ "CAT_FASTQ", "cat", - "9.4" + "9.5" ] ] } @@ -491,6 +491,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T14:13:35.944630361" + "timestamp": "2025-12-10T14:32:11.746498148" } } \ No newline at end of file