diff --git a/modules.json b/modules.json index e3630b3..e6122d5 100644 --- a/modules.json +++ b/modules.json @@ -7,35 +7,35 @@ "nf-core": { "bwa/index": { "branch": "master", - "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", + "git_sha": "966ba9887e2b04d89d64db06c01508873bde13b1", "installed_by": ["modules"] }, "bwa/mem": { "branch": "master", - "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", + "git_sha": "707241c72951f24fd89982c4c80c5983a4c437ef", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "af27af1be706e6a2bb8fe454175b0cdf77f47b49", + "git_sha": "575e1a4b51a9bad7a8cd1316a88fb85684ef7c7b", "installed_by": ["modules"], "patch": "modules/nf-core/multiqc/multiqc.diff" }, "ngsbits/samplegender": { "branch": "master", - "git_sha": "ae8668d026462283f3bdc70ad2d6c78f8919fe68", + "git_sha": "54c18191be1e99d78832cb62dc6fb9513ed97eae", "installed_by": ["modules"], "patch": "modules/nf-core/ngsbits/samplegender/ngsbits-samplegender.diff" }, "picard/crosscheckfingerprints": { "branch": "master", - "git_sha": "4e8415483e3119fc3035ece12ec9236dac261357", + "git_sha": "a631e12055f6c23ba2c942d3902b3ed1b9eed859", "installed_by": ["modules"], "patch": "modules/nf-core/picard/crosscheckfingerprints/picard-crosscheckfingerprints.diff" }, "samtools/index": { "branch": "master", - "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["modules"] } } diff --git a/modules/nf-core/bwa/index/main.nf b/modules/nf-core/bwa/index/main.nf index 1860ecf..6be2c43 100644 --- a/modules/nf-core/bwa/index/main.nf +++ b/modules/nf-core/bwa/index/main.nf @@ -13,8 +13,8 @@ process BWA_INDEX { tuple val(meta), path(fasta) output: - tuple val(meta), path("bwa") , emit: index - path "versions.yml" , emit: versions + tuple val(meta), path("bwa"), emit: index + tuple val("${task.process}"), val('bwa'), eval('bwa 2>&1 | sed -n "s/^Version: //p"'), topic: versions, emit: versions_bwa when: task.ext.when == null || task.ext.when @@ -29,27 +29,16 @@ process BWA_INDEX { $args \\ -p bwa/${prefix} \\ $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${fasta.baseName}" """ mkdir bwa - touch bwa/${prefix}.amb touch bwa/${prefix}.ann touch bwa/${prefix}.bwt touch bwa/${prefix}.pac touch bwa/${prefix}.sa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bwa/index/meta.yml b/modules/nf-core/bwa/index/meta.yml index 1781586..f5bf7f5 100644 --- a/modules/nf-core/bwa/index/meta.yml +++ b/modules/nf-core/bwa/index/meta.yml @@ -42,17 +42,30 @@ output: pattern: "*.{amb,ann,bwt,pac,sa}" ontologies: - edam: "http://edamontology.org/data_3210" # Genome index + versions_bwa: + - - ${task.process}: + type: string + description: The process the versions were collected from + - bwa: + type: string + description: The tool name + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: string + description: The command used to generate 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 + - bwa: + type: string + description: The tool name + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: string + description: The command used to generate the version of the tool authors: - "@drpatelh" - "@maxulysse" maintainers: - - "@drpatelh" - "@maxulysse" - "@gallvp" diff --git a/modules/nf-core/bwa/index/tests/main.nf.test b/modules/nf-core/bwa/index/tests/main.nf.test index af33e73..f0fba82 100644 --- a/modules/nf-core/bwa/index/tests/main.nf.test +++ b/modules/nf-core/bwa/index/tests/main.nf.test @@ -22,8 +22,32 @@ nextflow_process { } then { + assert process.success + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + + test("BWA index - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success assertAll( - { assert process.success }, { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/bwa/index/tests/main.nf.test.snap b/modules/nf-core/bwa/index/tests/main.nf.test.snap index 8fdb482..21a6f73 100644 --- a/modules/nf-core/bwa/index/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/index/tests/main.nf.test.snap @@ -1,4 +1,57 @@ { + "BWA index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_bwa": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-23T16:58:59.966558606" + }, "BWA index": { "content": [ { @@ -17,7 +70,11 @@ ] ], "1": [ - "versions.yml:md5,9a94c646009e4e01912bde135de16400" + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] ], "index": [ [ @@ -33,15 +90,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,9a94c646009e4e01912bde135de16400" + "versions_bwa": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:03.657185748" + "timestamp": "2026-01-23T16:58:53.330725134" } } \ No newline at end of file diff --git a/modules/nf-core/bwa/mem/main.nf b/modules/nf-core/bwa/mem/main.nf index 6893b04..e373267 100644 --- a/modules/nf-core/bwa/mem/main.nf +++ b/modules/nf-core/bwa/mem/main.nf @@ -18,7 +18,8 @@ process BWA_MEM { tuple val(meta), path("*.cram") , emit: cram, optional: true tuple val(meta), path("*.csi") , emit: csi, optional: true tuple val(meta), path("*.crai") , emit: crai, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bwa'), eval('bwa 2>&1 | sed -n "s/^Version: //p"'), topic: versions, emit: versions_bwa + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -44,12 +45,6 @@ process BWA_MEM { \$INDEX \\ $reads \\ | samtools $samtools_command $args2 ${reference} --threads $task.cpus -o ${prefix}.${extension} - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -64,11 +59,5 @@ process BWA_MEM { touch ${prefix}.${extension} touch ${prefix}.csi touch ${prefix}.crai - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml index e1265ab..450a3fe 100644 --- a/modules/nf-core/bwa/mem/meta.yml +++ b/modules/nf-core/bwa/mem/meta.yml @@ -16,7 +16,8 @@ tools: homepage: http://bio-bwa.sourceforge.net/ documentation: https://bio-bwa.sourceforge.net/bwa.shtml arxiv: arXiv:1303.3997 - licence: ["GPL-3.0-or-later"] + licence: + - "GPL-3.0-or-later" identifier: "biotools:bwa" input: - - meta: @@ -30,8 +31,8 @@ input: List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1930" # FASTQ + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1930" - - meta2: type: map description: | @@ -42,7 +43,7 @@ input: description: BWA genome index files pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" ontologies: - - edam: "http://edamontology.org/data_3210" # Genome index + - edam: "http://edamontology.org/data_3210" - - meta3: type: map description: | @@ -53,8 +54,8 @@ input: description: Reference genome in FASTA format pattern: "*.{fasta,fa}" ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1929" # FASTA + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1929" - sort_bam: type: boolean description: use samtools sort (true) or samtools view (false) @@ -69,18 +70,17 @@ output: description: Output BAM file containing read alignments pattern: "*.{bam}" ontologies: - - edam: "http://edamontology.org/format_2572" # BAM + - edam: "http://edamontology.org/format_2572" cram: - - meta: - type: file - description: Output BAM file containing read alignments - ontologies: [] + type: map + description: Groovy Map containing sample information - "*.cram": type: file description: Output CRAM file containing read alignments pattern: "*.{cram}" ontologies: - - edam: "http://edamontology.org/format_3462" # CRAM + - edam: "http://edamontology.org/format_3462" csi: - - meta: type: map @@ -99,13 +99,46 @@ output: description: Optional index file for CRAM file pattern: "*.{crai}" ontologies: [] + versions_bwa: + - - ${task.process}: + type: string + description: The name of the process + - bwa: + type: string + description: The name of the tool + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: eval + description: The expression to obtain the version of the tool + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;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 name of the process + - bwa: + type: string + description: The name of the tool + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@jeremy1805" diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test b/modules/nf-core/bwa/mem/tests/main.nf.test index 5de2c2f..6486ab0 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test +++ b/modules/nf-core/bwa/mem/tests/main.nf.test @@ -48,8 +48,7 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), + process.out.findAll { key, val -> key.startsWith("versions") }, bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -83,8 +82,7 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), + process.out.findAll { key, val -> key.startsWith("versions") }, bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -119,8 +117,7 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), + process.out.findAll { key, val -> key.startsWith("versions") }, bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -155,8 +152,7 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), + process.out.findAll { key, val -> key.startsWith("versions") }, bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -191,8 +187,7 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), + process.out.findAll { key, val -> key.startsWith("versions") }, bam(process.out.bam[0][1]).getReadsMD5() ).match() } diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap index 51496a3..8aca4b2 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap @@ -10,17 +10,29 @@ [ ], - [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" - ], - "37b4ee1649480bd1ff98666447f64fa5", + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, "798439cbd7fd81cbcc5078022dc5479d" ], + "timestamp": "2026-02-18T12:42:52.901827", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:11.396076472" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Single-End Sort": { "content": [ @@ -33,17 +45,29 @@ [ ], - [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" - ], - "57106634fcaf3bf503d5487a7717c5d3", + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, "94fcf617f5b994584c4e8d4044e16b4f" ], + "timestamp": "2026-02-18T12:43:01.149915", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:19.529514701" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End": { "content": [ @@ -56,17 +80,29 @@ [ ], - [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" - ], - "57770ff7c7186ed40c42f3d71c16ce3c", + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, "57aeef88ed701a8ebc8e2f0a381b2a6" ], + "timestamp": "2026-02-18T12:43:09.528042", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:27.433790935" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End Sort": { "content": [ @@ -79,17 +115,29 @@ [ ], - [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" - ], - "8f5d8f83b485dcfa1f47a73ae645e3a7", + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, "af8628d9df18b2d3d4f6fd47ef2bb872" ], + "timestamp": "2026-02-18T12:43:17.876121", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:35.775774487" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Single-end - stub": { "content": [ @@ -125,7 +173,18 @@ ] ], "4": [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "5": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] ], "bam": [ [ @@ -157,16 +216,27 @@ "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] ] } ], + "timestamp": "2026-02-18T12:43:33.853248", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:51.638917351" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End - no fasta": { "content": [ @@ -179,17 +249,29 @@ [ ], - [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" - ], - "57770ff7c7186ed40c42f3d71c16ce3c", + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, "57aeef88ed701a8ebc8e2f0a381b2a6" ], + "timestamp": "2026-02-18T12:43:26.121474", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:43.764589371" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-end - stub": { "content": [ @@ -225,7 +307,18 @@ ] ], "4": [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "5": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] ], "bam": [ [ @@ -257,15 +350,26 @@ "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] ] } ], + "timestamp": "2026-02-18T12:43:42.119907", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-23T11:05:59.642014144" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index d02016a..009874d 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.32 + - bioconda::multiqc=1.33 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index d3d9307..fe72de8 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,8 +3,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/8c/8c6c120d559d7ee04c7442b61ad7cf5a9e8970be5feefb37d68eeaa60c1034eb/data' : - 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data' : + 'community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b' }" input: tuple val(meta), path(multiqc_files, stageAs: "?/*") @@ -15,10 +15,11 @@ process MULTIQC { path(sample_names) output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions + path "*.html" , emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions + // MultiQC should not push its versions to the `versions` topic. Its input depends on the versions topic to be resolved thus outputting to the topic will let the pipeline hang forever when: task.ext.when == null || task.ext.when @@ -29,27 +30,22 @@ process MULTIQC { if(args.contains("--title")) { prefix = args.split("--title ")[-1].split(" ")[0] + "_" } - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + def config = multiqc_config ? "--config ${multiqc_config}" : '' + def extra_config = extra_multiqc_config ? "--config ${extra_multiqc_config}" : '' def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' def replace = replace_names ? "--replace-names ${replace_names}" : '' def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ - $args \\ - $config \\ - $prefix \\ - $extra_config \\ - $logo \\ - $replace \\ - $samples \\ + ${args} \\ + ${config} \\ + ${prefix} \\ + ${extra_config} \\ + ${logo} \\ + ${replace} \\ + ${samples} \\ . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ stub: @@ -60,12 +56,8 @@ process MULTIQC { } """ mkdir ${prefix}multiqc_data + touch ${prefix}multiqc_data/.stub mkdir ${prefix}multiqc_plots touch ${prefix}multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ } diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index ce30eb7..9fd34f3 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -57,10 +57,10 @@ input: - edam: http://edamontology.org/format_3475 # TSV output: report: - - "*multiqc_report.html": + - "*.html": type: file description: MultiQC report file - pattern: "multiqc_report.html" + pattern: ".html" ontologies: [] data: - "*_data": @@ -71,15 +71,18 @@ output: - "*_plots": type: file description: Plots created by MultiQC - pattern: "*_data" + pattern: "*_plots" ontologies: [] 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 + - multiqc: + type: string + description: The tool name + - multiqc --version | sed "s/.* //g": + type: eval + description: The expression to obtain the version of the tool authors: - "@abhi18av" - "@bunop" @@ -90,3 +93,27 @@ maintainers: - "@bunop" - "@drpatelh" - "@jfy133" +containers: + conda: + linux/amd64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-ee7739d47738383b_1/condalock + linux/arm64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-58d7dee710ab3aa8_1/condalock + docker: + linux/amd64: + build_id: bd-ee7739d47738383b_1 + name: community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b + scanId: sc-6ddec592dcadd583_4 + linux/arm64: + build_id: bd-58d7dee710ab3aa8_1 + name: community.wave.seqera.io/library/multiqc:1.33--58d7dee710ab3aa8 + scanId: sc-a04c42273e34c55c_2 + singularity: + linux/amd64: + build_id: bd-e3576ddf588fa00d_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--e3576ddf588fa00d + linux/arm64: + build_id: bd-2537ca5f8445e3c2_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/78/78b89e91d89e9cc99ad5ade5be311f347838cb2acbfb4f13bc343b170be09ce4/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--2537ca5f8445e3c2 diff --git a/modules/nf-core/multiqc/multiqc.diff b/modules/nf-core/multiqc/multiqc.diff index ed42434..3c4697d 100644 --- a/modules/nf-core/multiqc/multiqc.diff +++ b/modules/nf-core/multiqc/multiqc.diff @@ -3,15 +3,15 @@ Changes in 'multiqc/main.nf': --- modules/nf-core/multiqc/main.nf +++ modules/nf-core/multiqc/main.nf @@ -7,7 +7,7 @@ - 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + 'community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b' }" input: -- path multiqc_files, stageAs: "?/*" +- path multiqc_files, stageAs: "?/*" + tuple val(meta), path(multiqc_files, stageAs: "?/*") path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) -@@ -25,7 +25,10 @@ +@@ -26,7 +26,10 @@ script: def args = task.ext.args ?: '' @@ -20,10 +20,10 @@ Changes in 'multiqc/main.nf': + if(args.contains("--title")) { + prefix = args.split("--title ")[-1].split(" ")[0] + "_" + } - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + def config = multiqc_config ? "--config ${multiqc_config}" : '' + def extra_config = extra_multiqc_config ? "--config ${extra_multiqc_config}" : '' def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' -@@ -50,10 +53,15 @@ +@@ -46,10 +49,15 @@ """ stub: @@ -34,17 +34,19 @@ Changes in 'multiqc/main.nf': + } """ - mkdir multiqc_data +- touch multiqc_data/.stub - mkdir multiqc_plots - touch multiqc_report.html + mkdir ${prefix}multiqc_data ++ touch ${prefix}multiqc_data/.stub + mkdir ${prefix}multiqc_plots + touch ${prefix}multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": + """ + } 'modules/nf-core/multiqc/environment.yml' is unchanged 'modules/nf-core/multiqc/meta.yml' is unchanged +'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged 'modules/nf-core/multiqc/tests/main.nf.test' is unchanged 'modules/nf-core/multiqc/tests/main.nf.test.snap' is unchanged 'modules/nf-core/multiqc/tests/nextflow.config' is unchanged diff --git a/modules/nf-core/multiqc/tests/custom_prefix.config b/modules/nf-core/multiqc/tests/custom_prefix.config new file mode 100644 index 0000000..b30b135 --- /dev/null +++ b/modules/nf-core/multiqc/tests/custom_prefix.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = "custom_prefix" + } +} diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 33316a7..d1ae8b0 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -30,7 +30,33 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_single") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() } + ) + } + + } + + test("sarscov2 single-end [fastqc] - custom prefix") { + config "./custom_prefix.config" + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.report[0] ==~ ".*/custom_prefix.html" }, + { assert process.out.data[0] ==~ ".*/custom_prefix_data" } ) } @@ -56,7 +82,7 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_config") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() } ) } } @@ -84,7 +110,7 @@ nextflow_process { { assert snapshot(process.out.report.collect { file(it).getName() } + process.out.data.collect { file(it).getName() } + process.out.plots.collect { file(it).getName() } + - process.out.versions ).match("multiqc_stub") } + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index a88bafd..d72d35b 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -1,41 +1,61 @@ { - "multiqc_versions_single": { + "sarscov2 single-end [fastqc]": { "content": [ - [ - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" - ] + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-27T13:33:24.356715" + "timestamp": "2025-12-09T10:10:43.020315838" }, - "multiqc_stub": { + "sarscov2 single-end [fastqc] - stub": { "content": [ [ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ] ], "meta": { "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-27T13:34:11.103619" + "timestamp": "2025-12-09T10:11:14.131950776" }, - "multiqc_versions_config": { + "sarscov2 single-end [fastqc] [config]": { "content": [ - [ - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" - ] + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-27T13:34:04.615233" + "timestamp": "2025-12-09T10:11:07.15692209" } } \ No newline at end of file diff --git a/modules/nf-core/ngsbits/samplegender/environment.yml b/modules/nf-core/ngsbits/samplegender/environment.yml index d46a0cd..b8793f5 100644 --- a/modules/nf-core/ngsbits/samplegender/environment.yml +++ b/modules/nf-core/ngsbits/samplegender/environment.yml @@ -5,4 +5,4 @@ channels: - bioconda dependencies: # renovate: datasource=conda depName=bioconda/ngs-bits - - bioconda::ngs-bits=2025_09 + - bioconda::ngs-bits=2025_12 diff --git a/modules/nf-core/ngsbits/samplegender/main.nf b/modules/nf-core/ngsbits/samplegender/main.nf index e33c661..29ed242 100644 --- a/modules/nf-core/ngsbits/samplegender/main.nf +++ b/modules/nf-core/ngsbits/samplegender/main.nf @@ -4,8 +4,8 @@ process NGSBITS_SAMPLEGENDER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/2b/2be56a07ac1d5a447a10fd061be4d6144620bec00bac834f58c2bdef0330147f/data': - 'community.wave.seqera.io/library/ngs-bits:2025_09--f6ea3a4494373ed6' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/fb/fbf8cfd89c36e9a18a895066bb1da04b93ef585a593b0821ec7037aba6c03474/data': + 'community.wave.seqera.io/library/ngs-bits:2025_12--958625b0e620100a' }" input: tuple val(meta), path(bam), path(bai) @@ -16,7 +16,7 @@ process NGSBITS_SAMPLEGENDER { tuple val(meta), path("*_xy.tsv") , emit: xy_tsv tuple val(meta), path("*_hetx.tsv") , emit: hetx_tsv tuple val(meta), path("*_sry.tsv") , emit: sry_tsv - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('ngsbits'), eval("SampleGender --version 2>&1 | sed 's/SampleGender //'"), topic: versions, emit: versions_ngsbits when: task.ext.when == null || task.ext.when @@ -48,11 +48,6 @@ process NGSBITS_SAMPLEGENDER { -out ${prefix}_sry.tsv \\ ${ref} \\ ${args3} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ngs-bits: \$(echo \$(SampleGender --version 2>&1) | sed 's/SampleGender //' ) - END_VERSIONS """ stub: @@ -61,10 +56,5 @@ process NGSBITS_SAMPLEGENDER { touch ${prefix}_xy.tsv touch ${prefix}_hetx.tsv touch ${prefix}_sry.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ngs-bits: \$(echo \$(SampleGender --version 2>&1) | sed 's/SampleGender //' ) - END_VERSIONS """ } diff --git a/modules/nf-core/ngsbits/samplegender/meta.yml b/modules/nf-core/ngsbits/samplegender/meta.yml index 4b79dfc..8d4773e 100644 --- a/modules/nf-core/ngsbits/samplegender/meta.yml +++ b/modules/nf-core/ngsbits/samplegender/meta.yml @@ -11,7 +11,8 @@ tools: homepage: "https://github.com/imgag/ngs-bits" documentation: "https://github.com/imgag/ngs-bits" tool_dev_url: "https://github.com/imgag/ngs-bits" - licence: ["MIT"] + licence: + - "MIT" identifier: "" input: - - meta: @@ -36,7 +37,8 @@ input: e.g. [ id:'test' ] - fasta: type: file - description: The reference FASTA to use (mandatory when CRAM files are used) + description: The reference FASTA to use (mandatory when CRAM files are + used) pattern: "*.{fasta,fa,fna}" ontologies: [] - - meta3: @@ -51,8 +53,8 @@ input: ontologies: [] - method: type: string - description: The method to use to define the gender (possibilities are 'xy', 'hetx' - and 'sry') + description: The method to use to define the gender (possibilities are 'xy', + 'hetx' and 'sry') pattern: "(xy|hetx|sry)" output: tsv: @@ -63,17 +65,32 @@ output: e.g. [ id:'test', single_end:false ] - "*.tsv": type: file - description: An output TSV file containing the results of the gender prediction + description: An output TSV file containing the results of the gender + prediction pattern: "*.tsv" ontologies: - - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_3475 + versions_ngsbits: + - - ${task.process}: + type: string + description: The name of the process + - ngsbits: + type: string + description: The name of the tool + - SampleGender --version 2>&1 | sed 's/SampleGender //': + 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 name of the process + - ngsbits: + type: string + description: The name of the tool + - SampleGender --version 2>&1 | sed 's/SampleGender //': + type: eval + description: The expression to obtain the version of the tool authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/ngsbits/samplegender/ngsbits-samplegender.diff b/modules/nf-core/ngsbits/samplegender/ngsbits-samplegender.diff index f60ed79..2cbd388 100644 --- a/modules/nf-core/ngsbits/samplegender/ngsbits-samplegender.diff +++ b/modules/nf-core/ngsbits/samplegender/ngsbits-samplegender.diff @@ -1,10 +1,8 @@ Changes in component 'nf-core/ngsbits/samplegender' -'modules/nf-core/ngsbits/samplegender/environment.yml' is unchanged -'modules/nf-core/ngsbits/samplegender/meta.yml' is unchanged Changes in 'ngsbits/samplegender/main.nf': --- modules/nf-core/ngsbits/samplegender/main.nf +++ modules/nf-core/ngsbits/samplegender/main.nf -@@ -11,26 +11,43 @@ +@@ -11,10 +11,11 @@ tuple val(meta), path(bam), path(bai) tuple val(meta2), path(fasta) tuple val(meta3), path(fai) @@ -12,14 +10,13 @@ Changes in 'ngsbits/samplegender/main.nf': output: - tuple val(meta), path("*.tsv"), emit: tsv -- path "versions.yml" , emit: versions + tuple val(meta), path("*_xy.tsv") , emit: xy_tsv + tuple val(meta), path("*_hetx.tsv") , emit: hetx_tsv + tuple val(meta), path("*_sry.tsv") , emit: sry_tsv -+ path "versions.yml" , emit: versions + tuple val("${task.process}"), val('ngsbits'), eval("SampleGender --version 2>&1 | sed 's/SampleGender //'"), topic: versions, emit: versions_ngsbits when: - task.ext.when == null || task.ext.when +@@ -22,20 +23,38 @@ script: def args = task.ext.args ?: '' @@ -51,10 +48,8 @@ Changes in 'ngsbits/samplegender/main.nf': + -out ${prefix}_sry.tsv \\ + ${ref} \\ + ${args3} + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": -@@ -41,7 +58,9 @@ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -62,10 +57,11 @@ Changes in 'ngsbits/samplegender/main.nf': + touch ${prefix}_xy.tsv + touch ${prefix}_hetx.tsv + touch ${prefix}_sry.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": + """ + } -'modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap' is unchanged +'modules/nf-core/ngsbits/samplegender/environment.yml' is unchanged +'modules/nf-core/ngsbits/samplegender/meta.yml' is unchanged 'modules/nf-core/ngsbits/samplegender/tests/main.nf.test' is unchanged +'modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap' is unchanged ************************************************************ diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap index 332dbc9..f634347 100644 --- a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap +++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,c04e34f7e4a6606e29846359c34440e9" + [ + "NGSBITS_SAMPLEGENDER", + "ngsbits", + "2025_12" + ] ], "tsv": [ [ @@ -21,15 +25,19 @@ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,c04e34f7e4a6606e29846359c34440e9" + "versions_ngsbits": [ + [ + "NGSBITS_SAMPLEGENDER", + "ngsbits", + "2025_12" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-26T13:18:40.119665" + "timestamp": "2026-02-16T09:21:42.78314623" } } \ No newline at end of file diff --git a/modules/nf-core/picard/crosscheckfingerprints/main.nf b/modules/nf-core/picard/crosscheckfingerprints/main.nf index e68989d..51ab913 100644 --- a/modules/nf-core/picard/crosscheckfingerprints/main.nf +++ b/modules/nf-core/picard/crosscheckfingerprints/main.nf @@ -1,19 +1,19 @@ process PICARD_CROSSCHECKFINGERPRINTS { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/08/0861295baa7c01fc593a9da94e82b44a729dcaf8da92be8e565da109aa549b25/data' : - 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/08/0861295baa7c01fc593a9da94e82b44a729dcaf8da92be8e565da109aa549b25/data' + : 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6'}" input: - tuple val(meta), path(input1), path(input1_index), path(input2), path(input2_index), path(haplotype_map) + tuple val(meta), path(input1), path(input1_index), path(input2), path(input2_index), path(haplotype_map) tuple val(meta2), path(fasta), path(fasta_index) output: tuple val(meta), path("*.crosscheck_metrics.txt"), emit: crosscheck_metrics - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('picard'), eval("picard CrosscheckFingerprints --version 2>&1 | sed -n 's/.*Version://p'"), topic: versions, emit: versions_picard when: task.ext.when == null || task.ext.when @@ -22,15 +22,16 @@ process PICARD_CROSSCHECKFINGERPRINTS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input1_cmd = input1.collect{ f1 -> "--INPUT $f1"}.join(' ') - def input2_cmd = input2.collect{ f2 -> "--SECOND_INPUT $f2"}.join(' ') - def reference_cmd = fasta ? "--REFERENCE_SEQUENCE $fasta" : "" + def input1_cmd = input1.collect { f1 -> "--INPUT ${f1}" }.join(' ') + def input2_cmd = input2.collect { f2 -> "--SECOND_INPUT ${f2}" }.join(' ') + def reference_cmd = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3072 if (!task.memory) { - log.info '[Picard CrosscheckFingerprints] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' - } else { - avail_mem = (task.memory.mega*0.8).intValue() + log.info('[Picard CrosscheckFingerprints] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.') + } + else { + avail_mem = (task.memory.mega * 0.8).intValue() } """ picard \\ @@ -42,23 +43,12 @@ process PICARD_CROSSCHECKFINGERPRINTS { --HAPLOTYPE_MAP ${haplotype_map} \\ --OUTPUT ${prefix}.crosscheck_metrics.txt \\ --NUM_THREADS ${task.cpus} \\ - $args - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$( picard CrosscheckFingerprints --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d: ) - END_VERSIONS + ${args} """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.crosscheck_metrics.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(echo \$(picard CollectHsMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) - END_VERSIONS """ } diff --git a/modules/nf-core/picard/crosscheckfingerprints/meta.yml b/modules/nf-core/picard/crosscheckfingerprints/meta.yml index 6271e9a..72ceddf 100644 --- a/modules/nf-core/picard/crosscheckfingerprints/meta.yml +++ b/modules/nf-core/picard/crosscheckfingerprints/meta.yml @@ -71,13 +71,27 @@ output: description: Metrics created by crosscheckfingerprints pattern: "*.{crosscheck_metrics.txt}" ontologies: [] + versions_picard: + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CrosscheckFingerprints --version 2>&1 | sed -n 's/.*Version://p'": + type: string + description: The command used to generate 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 + - picard: + type: string + description: The tool name + - "picard CrosscheckFingerprints --version 2>&1 | sed -n 's/.*Version://p'": + type: string + description: The command used to generate the version of the tool authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/picard/crosscheckfingerprints/picard-crosscheckfingerprints.diff b/modules/nf-core/picard/crosscheckfingerprints/picard-crosscheckfingerprints.diff index 86b0117..ec28082 100644 --- a/modules/nf-core/picard/crosscheckfingerprints/picard-crosscheckfingerprints.diff +++ b/modules/nf-core/picard/crosscheckfingerprints/picard-crosscheckfingerprints.diff @@ -5,7 +5,7 @@ Changes in 'picard/crosscheckfingerprints/main.nf': @@ -9,7 +9,7 @@ input: - tuple val(meta), path(input1), path(input1_index), path(input2), path(input2_index), path(haplotype_map) + tuple val(meta), path(input1), path(input1_index), path(input2), path(input2_index), path(haplotype_map) - tuple val(meta2), path(fasta) + tuple val(meta2), path(fasta), path(fasta_index) diff --git a/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test b/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test index 33eb40d..0d56485 100644 --- a/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test +++ b/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test @@ -16,19 +16,19 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], //meta - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) - ], // input1 - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai', checkIfExists: true) - ], // input1_index - [], // input2 - [], // input2_index - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/haplotype_map.txt', checkIfExists: true) // haplotype_map - ] + [ id:'test', single_end:false ], //meta + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) + ], // input1 + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai', checkIfExists: true) + ], // input1_index + [], // input2 + [], // input2_index + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/haplotype_map.txt', checkIfExists: true) // haplotype_map + ] input[1] = [[:],[]] """ } @@ -37,16 +37,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.crosscheck_metrics[0][1]).name).match("Crosscheck - bam") }, - { assert snapshot(process.out.versions).match("Crosscheck versions - bam") } + { assert snapshot( + file(process.out.crosscheck_metrics[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match() }, ) } } test("homo sapiens - bam - stub") { - options "-stub" - when { process { """ @@ -72,11 +72,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.crosscheck_metrics[0][1]).name).match("Crosscheck stub") }, - { assert snapshot(process.out.versions).match("Crosscheck versions stub") } + { assert snapshot( + file(process.out.crosscheck_metrics[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match() }, ) } - } - } diff --git a/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test.snap b/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test.snap index e8a07aa..b084cec 100644 --- a/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test.snap +++ b/modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test.snap @@ -1,46 +1,40 @@ { - "Crosscheck - bam": { + "homo sapiens - bam - index": { "content": [ - "test.crosscheck_metrics.txt" + "test.crosscheck_metrics.txt", + { + "versions_picard": [ + [ + "PICARD_CROSSCHECKFINGERPRINTS", + "picard", + "3.4.0" + ] + ] + } ], + "timestamp": "2026-02-19T17:40:48.407807817", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-08T14:30:50.281417" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, - "Crosscheck stub": { + "homo sapiens - bam - stub": { "content": [ - "test.crosscheck_metrics.txt" + "test.crosscheck_metrics.txt", + { + "versions_picard": [ + [ + "PICARD_CROSSCHECKFINGERPRINTS", + "picard", + "3.4.0" + ] + ] + } ], + "timestamp": "2026-02-19T17:40:58.035559875", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-07T14:47:29.486272" - }, - "Crosscheck versions stub": { - "content": [ - [ - "versions.yml:md5,dd796808c6bb2051ef0209a1e4b333df" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-15T10:48:14.486452441" - }, - "Crosscheck versions - bam": { - "content": [ - [ - "versions.yml:md5,dd796808c6bb2051ef0209a1e4b333df" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-15T10:48:05.046808725" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index a77ad82..e2a0e56 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -14,7 +14,7 @@ process SAMTOOLS_INDEX { tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.csi") , optional:true, emit: csi tuple val(meta), path("*.crai"), optional:true, emit: crai - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -27,11 +27,6 @@ process SAMTOOLS_INDEX { -@ ${task.cpus} \\ $args \\ $input - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -40,10 +35,5 @@ process SAMTOOLS_INDEX { "crai" : args.contains("-c") ? "csi" : "bai" """ touch ${input}.${extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index 1bed6bc..c6d4ce2 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -14,7 +14,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:samtools input: - - meta: @@ -60,13 +61,27 @@ output: description: BAM/CRAM/SAM index file pattern: "*.{bai,crai,sai}" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;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 name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index ca34fb5..c96cec8 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -23,7 +23,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.bai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -43,7 +46,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.crai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -67,7 +73,7 @@ nextflow_process { { assert process.success }, { assert snapshot( file(process.out.csi[0][1]).name, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -89,7 +95,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.bai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -110,7 +119,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.crai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -133,7 +145,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.csi, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap index 3836c6b..afc8a1f 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -1,250 +1,156 @@ { "csi - stub": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ], - "bai": [ - - ], - "crai": [ - - ], - "csi": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" ] - ], - "versions": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:38.25787" + "timestamp": "2026-01-28T17:52:10.030187" }, "crai - stub": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], { - "0": [ - - ], - "1": [ - - ], - "2": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" ] - ], - "3": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ], - "bai": [ - - ], - "crai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "csi": [ - - ], - "versions": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:34.496412" + "timestamp": "2026-01-28T17:51:59.125484" }, "bai - stub": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], { - "0": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ], - "bai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "crai": [ - - ], - "csi": [ - - ], - "versions": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:25.934431" + "timestamp": "2026-01-28T17:51:47.277042" }, "csi": { "content": [ "test.paired_end.sorted.bam.csi", - [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ] + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:22.262088" + "timestamp": "2026-01-28T17:51:35.758735" }, "crai": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], { - "0": [ - - ], - "1": [ - - ], - "2": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" ] - ], - "3": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ], - "bai": [ - - ], - "crai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" - ] - ], - "csi": [ - - ], - "versions": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:18.191664" + "timestamp": "2026-01-28T17:51:26.561965" }, "bai": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" - ], - "bai": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" ] - ], - "crai": [ - - ], - "csi": [ - - ], - "versions": [ - "versions.yml:md5,b8717818c91b07de87c2a5590bad02e6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:13:08.51539" + "timestamp": "2026-01-28T17:51:15.299035" } } \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_sampletracking_pipeline/main.nf b/subworkflows/local/utils_nfcore_sampletracking_pipeline/main.nf index 7c83e26..59c1fdd 100644 --- a/subworkflows/local/utils_nfcore_sampletracking_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_sampletracking_pipeline/main.nf @@ -38,8 +38,6 @@ workflow PIPELINE_INITIALISATION { main: - ch_versions = channel.empty() - // // Print version and exit if required and dump pipeline parameters to JSON file // @@ -99,7 +97,6 @@ workflow PIPELINE_INITIALISATION { emit: samplesheet = ch_samplesheet - versions = ch_versions } /* diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 599939f..fe4f4c7 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -33,10 +33,6 @@ "sample2.xy_hetx.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "4": [ - "versions.yml:md5,63915ecd9cc27a8026cca35ada889a22", - "versions.yml:md5,7674f112f39abc693d4b32137dfe0d8f" - ], "crosscheck_metrics": [ ], @@ -67,18 +63,14 @@ "sample2.xy_sry.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", "sample2.xy_hetx.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "versions": [ - "versions.yml:md5,63915ecd9cc27a8026cca35ada889a22", - "versions.yml:md5,7674f112f39abc693d4b32137dfe0d8f" ] } ], + "timestamp": "2026-02-23T15:14:58.180905986", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T13:50:43.009108348" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Should run without failures": { "content": [ @@ -122,12 +114,6 @@ "sample2.xy_hetx.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "4": [ - "versions.yml:md5,63915ecd9cc27a8026cca35ada889a22", - "versions.yml:md5,7674f112f39abc693d4b32137dfe0d8f", - "versions.yml:md5,876348456fddc25acc7a59427a0bb5e5", - "versions.yml:md5,8b795c8654423b0a84fa18df4e35e688" - ], "crosscheck_metrics": [ [ { @@ -166,19 +152,13 @@ "sample2.xy_sry.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", "sample2.xy_hetx.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "versions": [ - "versions.yml:md5,63915ecd9cc27a8026cca35ada889a22", - "versions.yml:md5,7674f112f39abc693d4b32137dfe0d8f", - "versions.yml:md5,876348456fddc25acc7a59427a0bb5e5", - "versions.yml:md5,8b795c8654423b0a84fa18df4e35e688" ] } ], + "timestamp": "2026-02-23T15:14:39.356411664", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T13:50:05.39665767" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/workflows/sampletracking.nf b/workflows/sampletracking.nf index 4d3964f..6792c23 100644 --- a/workflows/sampletracking.nf +++ b/workflows/sampletracking.nf @@ -38,8 +38,6 @@ workflow SAMPLETRACKING { multiqc_methods_description // string: path/to/multiqc_methods_description main: - - def ch_versions = channel.empty() def ch_multiqc_files = channel.empty() def ch_pool_multiqc_files = channel.empty() @@ -101,10 +99,6 @@ workflow SAMPLETRACKING { [meta, sample_bam, sample_bam_index, snp_fastq, snp_bam, snp_bam_index] } - ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) - ch_versions = ch_versions.mix(SAMTOOLS_INDEX_SNP_BAM.out.versions.first()) - - // // Crosscheck fingerprints // @@ -139,7 +133,6 @@ workflow SAMPLETRACKING { ch_fasta_fai.map{meta, fasta, _fai -> [meta, fasta]}, true ) - ch_versions = ch_versions.mix(BWA_MEM.out.versions) ch_to_align.bam .join(BWA_MEM.out.cram, failOnMismatch:true, failOnDuplicate:true) @@ -161,7 +154,6 @@ workflow SAMPLETRACKING { ch_to_fingerprint, ch_fasta_fai ) - ch_versions = ch_versions.mix(PICARD_CROSSCHECKFINGERPRINTS.out.versions) ch_crosscheck_metrics_out = PICARD_CROSSCHECKFINGERPRINTS.out.crosscheck_metrics ch_pool_multiqc_files = ch_pool_multiqc_files.mix(PICARD_CROSSCHECKFINGERPRINTS.out.crosscheck_metrics) @@ -181,7 +173,6 @@ workflow SAMPLETRACKING { ch_fasta_fai.map { meta, fasta, _fai -> [meta, fasta]}.collect(), ch_fasta_fai.map { meta, _fasta, fai -> [meta, fai]}.collect(), ) - ch_versions = ch_versions.mix(NGSBITS_SAMPLEGENDER.out.versions.first()) ch_sex_prediction_out = NGSBITS_SAMPLEGENDER.out.xy_tsv .join(NGSBITS_SAMPLEGENDER.out.sry_tsv, failOnMismatch: true, failOnDuplicate: true) @@ -260,9 +251,33 @@ workflow SAMPLETRACKING { // // Collate and save software versions // - softwareVersionsToYAML(ch_versions) - .collectFile(storeDir: "${outdir}/pipeline_info", name: 'nf_core_pipeline_software_mqc_versions.yml', sort: true, newLine: true) - .set { ch_collated_versions } + + def topic_versions = channel.topic("versions") + .distinct() + .branch { entry -> + versions_file: entry instanceof Path + versions_tuple: true + } + + def topic_versions_string = topic_versions.versions_tuple + .map { process, tool, version -> + [ process[process.lastIndexOf(':')+1..-1], " ${tool}: ${version}" ] + } + .groupTuple(by:0) + .map { process, tool_versions -> + tool_versions.unique().sort() + "${process}:\n${tool_versions.join('\n')}" + } + + softwareVersionsToYAML(topic_versions.versions_file) + .mix(topic_versions_string) + .collectFile( + storeDir: "${outdir}/pipeline_info", + name: 'structural_software_' + 'mqc_' + 'versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } + // // MODULE: MultiQC @@ -318,7 +333,6 @@ workflow SAMPLETRACKING { multiqc_pools = MULTIQC_POOLS.out.report // channel: path(html) crosscheck_metrics = ch_crosscheck_metrics_out // channel: [ val(meta), path(metrics) ] sex_prediction = ch_sex_prediction_out // channel: [ val(meta), path(tsv) ] - versions = ch_versions // channel: [ path(versions.yml) ] } /*