diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf index 02d9b0f992b2..aab585ac4223 100644 --- a/modules/nf-core/samtools/view/main.nf +++ b/modules/nf-core/samtools/view/main.nf @@ -22,7 +22,7 @@ process SAMTOOLS_VIEW { tuple val(meta), path("${prefix}.${file_type}.crai"), emit: crai, optional: true tuple val(meta), path("${prefix}.unselected.${file_type}"), emit: unselected, optional: true tuple val(meta), path("${prefix}.unselected.${file_type}.{csi,crai}"), emit: unselected_index, optional: true - path "versions.yml", emit: versions + tuple val("${task.process}"), val('samtools'), eval('samtools --version | head -1 | sed -e "s/samtools //"'), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -60,11 +60,6 @@ process SAMTOOLS_VIEW { -o ${output_file} \\ $input \\ $args2 - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -95,10 +90,5 @@ process SAMTOOLS_VIEW { ${index} ${unselected} ${unselected_index} - - 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/view/meta.yml b/modules/nf-core/samtools/view/meta.yml index 3ebbdb891054..f56bf28ae256 100644 --- a/modules/nf-core/samtools/view/meta.yml +++ b/modules/nf-core/samtools/view/meta.yml @@ -140,13 +140,29 @@ output: description: index for the "unselected" file pattern: "*.unselected.{csi,crai}" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + versions_samtools: + - - ${task.process}: + type: string + description: Name of the process + - samtools: + type: string + description: Name of the tool + - samtools --version | head -1 | sed -e "s/samtools //: + type: string + description: Version of samtools used + +topics: + - versions: + - - process: + type: string + description: The process the versions were collected from + - tool: + type: string + description: The tool name + - version: + type: string + description: The version of the tool + authors: - "@drpatelh" - "@joseespinosa" diff --git a/modules/nf-core/samtools/view/tests/main.nf.test b/modules/nf-core/samtools/view/tests/main.nf.test index d8551dd8c6bf..de57b8e36e83 100644 --- a/modules/nf-core/samtools/view/tests/main.nf.test +++ b/modules/nf-core/samtools/view/tests/main.nf.test @@ -29,13 +29,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bam_bam") }, - { assert snapshot(process.out.bai).match("bam_bai") }, - { assert snapshot(process.out.crai).match("bam_crai") }, - { assert snapshot(process.out.cram).match("bam_cram") }, - { assert snapshot(process.out.csi).match("bam_csi") }, - { assert snapshot(process.out.sam).match("bam_sam") }, - { assert snapshot(process.out.versions).match("bam_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam"])).match()} ) } } @@ -62,11 +56,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions).match() - } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "csi"])).match()} ) } } @@ -93,10 +83,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.bai[0][1]).name, - process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "bai"])).match()} ) } } @@ -124,13 +111,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.bai[0][1]).name, - file(process.out.unselected[0][1]).name, - file(process.out.unselected_index[0][1]).name, - process.out.versions).match() - } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "bai", "unselected", "unselected_index"])).match()} ) } } @@ -158,13 +139,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.cram[0][1]).name, - file(process.out.crai[0][1]).name, - file(process.out.unselected[0][1]).name, - file(process.out.unselected_index[0][1]).name, - process.out.versions).match() - } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "bai", "unselected", "unselected_index", "crai"])).match()} ) } } @@ -192,13 +167,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.cram[0][1]).name).match("cram_cram") }, - { assert snapshot(process.out.bai).match("cram_bai") }, - { assert snapshot(process.out.bam).match("cram_bam") }, - { assert snapshot(process.out.crai).match("cram_crai") }, - { assert snapshot(process.out.csi).match("cram_csi") }, - { assert snapshot(process.out.sam).match("cram_sam") }, - { assert snapshot(process.out.versions).match("cram_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["cram"])).match()} ) } } @@ -228,13 +197,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_bam") }, - { assert snapshot(process.out.bai).match("cram_to_bam_bai") }, - { assert snapshot(process.out.crai).match("cram_to_bam_crai") }, - { assert snapshot(process.out.cram).match("cram_to_bam_cram") }, - { assert snapshot(process.out.csi).match("cram_to_bam_csi") }, - { assert snapshot(process.out.sam).match("cram_to_bam_sam") }, - { assert snapshot(process.out.versions).match("cram_to_bam_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam"])).match()} ) } } @@ -264,13 +227,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_index_bam") }, - { assert snapshot(file(process.out.csi[0][1]).name).match("cram_to_bam_index_csi") }, - { assert snapshot(process.out.bai).match("cram_to_bam_index_bai") }, - { assert snapshot(process.out.crai).match("cram_to_bam_index_crai") }, - { assert snapshot(process.out.cram).match("cram_to_bam_index_cram") }, - { assert snapshot(process.out.sam).match("cram_to_bam_index_sam") }, - { assert snapshot(process.out.versions).match("cram_to_bam_index_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "csi"])).match()} ) } } @@ -300,15 +257,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_index_qname_bam") }, - { assert snapshot(file(process.out.csi[0][1]).name).match("cram_to_bam_index_qname_csi") }, - { assert snapshot(process.out.bai).match("cram_to_bam_index_qname_bai") }, - { assert snapshot(process.out.crai).match("cram_to_bam_index_qname_crai") }, - { assert snapshot(process.out.cram).match("cram_to_bam_index_qname_cram") }, - { assert snapshot(process.out.sam).match("cram_to_bam_index_qname_sam") }, - { assert snapshot(file(process.out.unselected[0][1]).name).match("cram_to_bam_index_qname_unselected") }, - { assert snapshot(file(process.out.unselected_index[0][1]).name).match("cram_to_bam_index_qname_unselected_csi") }, - { assert snapshot(process.out.versions).match("cram_to_bam_index_qname_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "bai", "unselected", "unselected_index"])).match()} ) } } @@ -336,13 +285,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bam_stub_bam") }, - { assert snapshot(file(process.out.csi[0][1]).name).match("bam_stub_csi") }, - { assert snapshot(process.out.bai).match("bam_stub_bai") }, - { assert snapshot(process.out.crai).match("bam_stub_crai") }, - { assert snapshot(process.out.cram).match("bam_stub_cram") }, - { assert snapshot(process.out.sam).match("bam_stub_sam") }, - { assert snapshot(process.out.versions).match("bam_stub_versions") } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["bam", "csi"])).match()} ) } } diff --git a/modules/nf-core/samtools/view/tests/main.nf.test.snap b/modules/nf-core/samtools/view/tests/main.nf.test.snap index 5ec65d62b31c..6ee160cd42ea 100644 --- a/modules/nf-core/samtools/view/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/view/tests/main.nf.test.snap @@ -1,244 +1,49 @@ { - "bam_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:51.256068" - }, - "bam_stub_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:32.065301" - }, - "bam_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:51.258578" - }, - "bam_stub_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:32.071284" - }, - "bam_stub_versions": { - "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:20:28.366024" - }, - "cram_to_bam_index_qname_csi": { - "content": [ - "test.bam.csi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.325496" - }, - "cram_to_bam_index_qname_unselected_csi": { - "content": [ - "test.unselected.bam.csi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.328458" - }, - "bam_csi": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:51.262882" - }, - "cram_to_bam_index_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.95456" - }, - "cram_to_bam_index_versions": { - "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:20:20.3853" - }, - "bam_csi_index": { - "content": [ - "test.bam", - "test.bam.csi", - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:19:54.889079" - }, - "bam_versions": { - "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:19:51.017781" - }, - "cram_crai_index_unselected - stub": { + "cram_to_bam_index": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - - ], - "4": [ + "bai": [ ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.unselected.cram:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ + "bam": [ [ { "id": "test", "single_end": false }, - "test.unselected.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam" ] ], - "8": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ], - "bai": [ + "crai": [ ], - "bam": [ + "cram": [ ], - "crai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "cram": [ + "csi": [ [ { "id": "test", "single_end": false }, - "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam.csi" ] - ], - "csi": [ - ], "sam": [ ], "unselected": [ - [ - { - "id": "test", - "single_end": false - }, - "test.unselected.cram:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "unselected_index": [ + + ], + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.unselected.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" ] - ], - "versions": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" ] } ], @@ -246,79 +51,7 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:44.809515" - }, - "bam_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:51.259774" - }, - "bam_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:51.261287" - }, - "cram_sam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.502625" - }, - "cram_versions": { - "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:20:12.471005" - }, - "cram_to_bam_index_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.962863" - }, - "cram_to_bam_index_qname_sam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.337634" + "timestamp": "2025-10-29T15:41:48.952660444" }, "bam_csi_index - stub": { "content": [ @@ -360,7 +93,11 @@ ], "8": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] ], "bai": [ @@ -398,8 +135,12 @@ "unselected_index": [ ], - "versions": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] ] } ], @@ -407,94 +148,67 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:32.118817" - }, - "cram_to_bam_index_csi": { - "content": [ - "test.bam.csi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.958617" - }, - "bam_bai_index": { - "content": [ - "test.bam", - "test.bam.bai", - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T15:19:58.85102" - }, - "cram_to_bam_index_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.972288" + "timestamp": "2025-10-29T15:42:14.881335093" }, - "bam_bai_index - stub": { + "bam_csi_index": { "content": [ { - "0": [ + "bai": [ + + ], + "bam": [ [ { "id": "test", "single_end": false }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam" ] ], - "1": [ + "crai": [ ], - "2": [ + "cram": [ ], - "3": [ + "csi": [ [ { "id": "test", "single_end": false }, - "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam.csi" ] ], - "4": [ - - ], - "5": [ + "sam": [ ], - "6": [ + "unselected": [ ], - "7": [ + "unselected_index": [ ], - "8": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ], - "bai": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" ] + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-10-29T15:40:50.701779393" + }, + "cram_to_bam_index_qname": { + "content": [ + { + "bai": [ + ], "bam": [ [ @@ -502,7 +216,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam" ] ], "crai": [ @@ -512,19 +226,41 @@ ], "csi": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.bam.csi:md5,15d725bced7ececd45b4312b2af99a6b" + ] ], "sam": [ ], "unselected": [ - - ], + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.bam" + ] + ], "unselected_index": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.bam.csi" + ] ], - "versions": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] ] } ], @@ -532,297 +268,489 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:35.787886" - }, - "cram_to_bam_sam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:04.999247" - }, - "cram_to_bam_index_sam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.976457" - }, - "cram_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.497581" - }, - "cram_csi": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.50038" - }, - "cram_to_bam_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:04.992239" - }, - "bam_stub_sam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:32.079529" + "timestamp": "2025-10-29T15:41:58.085628072" }, - "cram_cram": { - "content": [ - "test.cram" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.490286" - }, - "cram_to_bam_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:04.989247" - }, - "cram_to_bam_index_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:12.967681" - }, - "cram_crai_index_unselected": { + "bam_bai_index_unselected": { "content": [ - "test.cram", - "test.cram.crai", - "test.unselected.cram", - "test.unselected.cram.crai", - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] + { + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.bam" + ] + ], + "unselected_index": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.bam.csi" + ] + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:07.026136" + "timestamp": "2025-10-29T15:41:10.249194373" }, - "cram_to_bam_index_qname_versions": { + "cram_crai_index_unselected - stub": { "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ], + "bai": [ + + ], + "bam": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "unselected_index": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:24.609054" + "timestamp": "2025-10-29T15:42:39.3240134" }, - "cram_to_bam_bam": { + "bam": { "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:04.982361" - }, - "cram_to_bam_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:04.98601" - }, - "cram_to_bam_versions": { - "content": [ - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] + { + "bai": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:16.51014" - }, - "cram_bam": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.495512" - }, - "bam_stub_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:32.076908" - }, - "cram_to_bam_index_qname_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.328458" + "timestamp": "2025-10-29T15:40:42.829284764" }, - "cram_to_bam_index_qname_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.330789" - }, - "cram_bai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:37:56.493129" - }, - "bam_stub_crai": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:32.074313" - }, - "cram_to_bam_index_qname_bam": { + "bam_bai_index": { "content": [ - "test.bam" + { + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-02-12T19:38:23.322874" + "timestamp": "2025-10-29T15:41:00.734899949" }, - "bam_bai_index_unselected": { + "cram_to_bam": { "content": [ - "test.bam", - "test.bam.bai", - "test.unselected.bam", - "test.unselected.bam.csi", - [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" - ] + { + "bai": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:03.049076" + "timestamp": "2025-10-29T15:41:40.148480065" }, - "cram_to_bam_index_qname_cram": { + "bam_bai_index - stub": { "content": [ - [ - - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + + ], + "8": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-02-12T19:38:23.333248" + "timestamp": "2025-10-29T15:42:22.748940869" }, - "cram_to_bam_csi": { + "cram": { "content": [ - [ - - ] + { + "bai": [ + + ], + "bam": [ + + ], + "crai": [ + + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram" + ] + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-02-12T19:38:04.995454" + "timestamp": "2025-10-29T15:41:30.602610389" }, "bam_bai_index_uselected - stub": { "content": [ @@ -876,7 +804,11 @@ ] ], "8": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] ], "bai": [ [ @@ -926,8 +858,12 @@ "test.unselected.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,376bd183239f91c807210bfeb299d306" + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] ] } ], @@ -935,38 +871,126 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T15:20:39.633146" - }, - "cram_to_bam_index_qname_unselected": { - "content": [ - "test.unselected.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-12T19:38:23.322874" + "timestamp": "2025-10-29T15:42:31.1133801" }, - "bam_sam": { + "cram_crai_index_unselected": { "content": [ - [ - - ] + { + "bai": [ + + ], + "bam": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram.crai" + ] + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,9b6eeca8f6b4b744297ae7cc87c031a4" + ] + ], + "csi": [ + + ], + "sam": [ + + ], + "unselected": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram" + ] + ], + "unselected_index": [ + [ + { + "id": "test", + "single_end": false + }, + "test.unselected.cram.crai" + ] + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-02-12T19:37:51.264651" + "timestamp": "2025-10-29T15:49:09.738258028" }, - "bam_stub_csi": { + "bam_stub": { "content": [ - "test.bam.csi" + { + "bai": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.csi" + ] + ], + "sam": [ + + ], + "unselected": [ + + ], + "unselected_index": [ + + ], + "versions_samtools": [ + [ + "SAMTOOLS_VIEW", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-02-12T19:38:32.068596" + "timestamp": "2025-10-29T15:42:06.108061867" } } \ No newline at end of file diff --git a/subworkflows/nf-core/bam_split_by_region/main.nf b/subworkflows/nf-core/bam_split_by_region/main.nf index 71b4d01c4e37..50442c767d5e 100644 --- a/subworkflows/nf-core/bam_split_by_region/main.nf +++ b/subworkflows/nf-core/bam_split_by_region/main.nf @@ -46,7 +46,6 @@ workflow BAM_SPLIT_BY_REGION { // The specified region is put into ext.args2 from the meta. See nextflow.config of the subworkflow. SAMTOOLS_VIEW(ch_bam_for_splitting, [[],[]], [], []) - ch_versions = ch_versions.mix(SAMTOOLS_VIEW.out.versions.first()) // // Index the output bams diff --git a/subworkflows/nf-core/bam_subsampledepth_samtools/main.nf b/subworkflows/nf-core/bam_subsampledepth_samtools/main.nf index a7d769116dcb..0f4d217d7143 100644 --- a/subworkflows/nf-core/bam_subsampledepth_samtools/main.nf +++ b/subworkflows/nf-core/bam_subsampledepth_samtools/main.nf @@ -40,7 +40,6 @@ workflow BAM_SUBSAMPLEDEPTH_SAMTOOLS { [], [] ) - ch_versions = ch_versions.mix(SAMTOOLS_VIEW.out.versions.first()) // Aggregate bam and index ch_bam_subsampled = SAMTOOLS_VIEW.out.bam.mix(SAMTOOLS_VIEW.out.cram, SAMTOOLS_VIEW.out.sam) diff --git a/subworkflows/nf-core/bam_subsampledepth_samtools/tests/main.nf.test.snap b/subworkflows/nf-core/bam_subsampledepth_samtools/tests/main.nf.test.snap index 91cfb02a009f..4ff5aad204db 100644 --- a/subworkflows/nf-core/bam_subsampledepth_samtools/tests/main.nf.test.snap +++ b/subworkflows/nf-core/bam_subsampledepth_samtools/tests/main.nf.test.snap @@ -42,7 +42,6 @@ ], "1": [ "versions.yml:md5,b31618773ed8a31f8635bca3da001eeb", - "versions.yml:md5,d90a2995d11e3c2a4a8b99799fb86fb6", "versions.yml:md5,eeb0a1f1cb18d25b5c98bf1f408302a7" ], "bam_subsampled": [ @@ -85,7 +84,6 @@ ], "versions": [ "versions.yml:md5,b31618773ed8a31f8635bca3da001eeb", - "versions.yml:md5,d90a2995d11e3c2a4a8b99799fb86fb6", "versions.yml:md5,eeb0a1f1cb18d25b5c98bf1f408302a7" ] }, @@ -128,6 +126,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-09-10T13:08:42.206943" + "timestamp": "2025-10-29T15:26:28.531547254" } } \ No newline at end of file