diff --git a/modules/nf-core/narfmap/align/tests/main.nf.test b/modules/nf-core/narfmap/align/tests/main.nf.test index 2670d9cebbc6..5204e8a5ec4d 100644 --- a/modules/nf-core/narfmap/align/tests/main.nf.test +++ b/modules/nf-core/narfmap/align/tests/main.nf.test @@ -43,7 +43,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name, bam(bamFile).getHeaderMD5()] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() @@ -73,7 +73,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name, bam(bamFile).getHeaderMD5()] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() @@ -106,7 +106,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name, bam(bamFile).getHeaderMD5()] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() @@ -139,7 +139,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name, bam(bamFile).getHeaderMD5()] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() @@ -172,7 +172,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name, bam(bamFile).getHeaderMD5()] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() @@ -207,7 +207,7 @@ nextflow_process { assertAll ( { assert process.success }, { assert snapshot( - process.out.bam, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name] }, file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, process.out.findAll { key, val -> key.startsWith("versions") } ).match() diff --git a/modules/nf-core/narfmap/align/tests/main.nf.test.snap b/modules/nf-core/narfmap/align/tests/main.nf.test.snap index a43b524b73ab..01ca6e3420ee 100644 --- a/modules/nf-core/narfmap/align/tests/main.nf.test.snap +++ b/modules/nf-core/narfmap/align/tests/main.nf.test.snap @@ -7,7 +7,8 @@ "id": "test", "single_end": false }, - "test.bam:md5,05a72e1f017061967c1ecd95b4a11588" + "test.bam", + "aa68d3e5ae6049159a563b4ea76b4478" ] ], [ @@ -42,10 +43,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:47.065808531", + "timestamp": "2026-08-03T17:28:06.089819887", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } }, "sarscov2 - [fastq1, fastq2], hashtable, true - stub": { @@ -56,7 +57,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam" ] ], [ @@ -86,10 +87,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:55.043442298", + "timestamp": "2026-08-03T17:29:56.49662919", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } }, "sarscov2 - CRAM": { @@ -143,7 +144,8 @@ "id": "test", "single_end": true }, - "test.bam:md5,3a275f59c824a956f234166274fe1049" + "test.bam", + "79e88aecfd62264a1018cf6cb47e7e39" ] ], [ @@ -178,10 +180,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:11.280098551", + "timestamp": "2026-08-03T17:26:49.650528933", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } }, "sarscov2 - fastq, hashtable, true": { @@ -192,7 +194,8 @@ "id": "test", "single_end": true }, - "test.bam:md5,af2401d3a72f278a9c3546ad77ee2a40" + "test.bam", + "58ccb538a46099fb73b47c76dd737bdc" ] ], [ @@ -227,10 +230,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:19.604675313", + "timestamp": "2026-08-03T17:26:59.779346529", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } }, "sarscov2 - [fastq1, fastq2], hashtable, false": { @@ -241,7 +244,8 @@ "id": "test", "single_end": false }, - "test.bam:md5,908b56dc99a1ca58af4d7d13bcba454e" + "test.bam", + "dcbfd5628b07cd75b0885f97d15cdd38" ] ], [ @@ -276,10 +280,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:28.156419739", + "timestamp": "2026-08-03T17:27:12.797643172", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } }, "sarscov2 - [fastq1, fastq2], hashtable, true": { @@ -290,7 +294,8 @@ "id": "test", "single_end": false }, - "test.bam:md5,05a72e1f017061967c1ecd95b4a11588" + "test.bam", + "aa68d3e5ae6049159a563b4ea76b4478" ] ], [ @@ -325,10 +330,10 @@ ] } ], - "timestamp": "2026-02-20T21:57:36.603419141", + "timestamp": "2026-08-03T17:27:26.864421081", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "25.10.2" } } -} \ No newline at end of file +} diff --git a/modules/nf-core/narfmap/align/tests/segfault.nf.test b/modules/nf-core/narfmap/align/tests/segfault.nf.test index 4e6136f2faa3..e70a2be82db1 100644 --- a/modules/nf-core/narfmap/align/tests/segfault.nf.test +++ b/modules/nf-core/narfmap/align/tests/segfault.nf.test @@ -44,9 +44,11 @@ nextflow_process { then { assertAll ( { assert process.success }, + { assert process.out.bam.every { meta, bamFile -> file(bamFile).exists() } }, + { assert process.out.bam.every { meta, bamFile -> file(bamFile).size() > 0 } }, + { assert file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") } }, { assert snapshot( - process.out.bam, - file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") }, + process.out.bam.collect { meta, bamFile -> [meta, file(bamFile).name] }, process.out.findAll { key, val -> key.startsWith("versions") }, ).match() } diff --git a/modules/nf-core/narfmap/align/tests/segfault.nf.test.snap b/modules/nf-core/narfmap/align/tests/segfault.nf.test.snap index 90c4cddbcd9b..9094ddcb54ed 100644 --- a/modules/nf-core/narfmap/align/tests/segfault.nf.test.snap +++ b/modules/nf-core/narfmap/align/tests/segfault.nf.test.snap @@ -7,17 +7,9 @@ "id": "test", "single_end": true }, - "test.bam:md5,4c3f0f32808e0b8e06b4bded09c1e17d" + "test.bam" ] ], - [ - "decompHashTableCtxInit...", - "decompHashTableHeader...", - "decompHashTableLiterals...", - "decompHashTableExtIndex...", - "decompHashTableAutoHits...", - "decompHashTableSetFlags..." - ], { "versions_narfmap": [ [ @@ -42,10 +34,10 @@ ] } ], + "timestamp": "2026-08-03T17:11:40.17375726", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-24T10:28:33.37180556" + "nf-test": "0.9.5", + "nextflow": "25.10.2" + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/narfmap/hashtable/main.nf b/modules/nf-core/narfmap/hashtable/main.nf index b916d8f3651d..358608668f2d 100644 --- a/modules/nf-core/narfmap/hashtable/main.nf +++ b/modules/nf-core/narfmap/hashtable/main.nf @@ -11,8 +11,8 @@ process NARFMAP_HASHTABLE { tuple val(meta), path(fasta) output: - tuple val(meta), path("narfmap") , emit: hashmap - path "versions.yml" , emit: versions + tuple val(meta), path("narfmap"), emit: hashmap + tuple val("${task.process}"), val('narfmap'), eval("dragen-os --version 2>&1"), emit: versions_narfmap, topic: versions when: task.ext.when == null || task.ext.when @@ -27,21 +27,11 @@ process NARFMAP_HASHTABLE { --output-directory narfmap \\ $args \\ --ht-num-threads $task.cpus - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - narfmap: \$(echo \$(dragen-os --version 2>&1)) - END_VERSIONS """ stub: """ mkdir narfmap - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - narfmap: \$(echo \$(dragen-os --version 2>&1)) - END_VERSIONS """ } diff --git a/modules/nf-core/narfmap/hashtable/meta.yml b/modules/nf-core/narfmap/hashtable/meta.yml index 42ba1ad18ad8..943db72c93ed 100644 --- a/modules/nf-core/narfmap/hashtable/meta.yml +++ b/modules/nf-core/narfmap/hashtable/meta.yml @@ -35,13 +35,27 @@ output: description: NARFMAP hash table pattern: "*.{cmp,.bin,.txt}" ontologies: [] + versions_narfmap: + - - ${task.process}: + type: string + description: The name of the process + - narfmap: + type: string + description: The name of the tool + - dragen-os --version 2>&1: + 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 + - narfmap: + type: string + description: The name of the tool + - dragen-os --version 2>&1: + type: eval + description: The expression to obtain the version of the tool authors: - "@edmundmiller" maintainers: diff --git a/modules/nf-core/narfmap/hashtable/tests/main.nf.test b/modules/nf-core/narfmap/hashtable/tests/main.nf.test index c68401a88855..19b3196dd26d 100644 --- a/modules/nf-core/narfmap/hashtable/tests/main.nf.test +++ b/modules/nf-core/narfmap/hashtable/tests/main.nf.test @@ -26,8 +26,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.hashmap[0][1]).name, - file(process.out.versions[0]).name + sanitizeOutput(process.out, unstableKeys: ["hashmap"]) ).match() } ) @@ -54,8 +53,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.hashmap[0][1]).name, - file(process.out.versions[0]).name + sanitizeOutput(process.out, unstableKeys: ["hashmap"]) ).match() } ) diff --git a/modules/nf-core/narfmap/hashtable/tests/main.nf.test.snap b/modules/nf-core/narfmap/hashtable/tests/main.nf.test.snap index 2f5b5edaf95b..ff4578ae0a24 100644 --- a/modules/nf-core/narfmap/hashtable/tests/main.nf.test.snap +++ b/modules/nf-core/narfmap/hashtable/tests/main.nf.test.snap @@ -1,24 +1,54 @@ { "sarscov2 - fasta - stub": { "content": [ - "narfmap", - "versions.yml" + { + "hashmap": [ + [ + { + "id": "test" + }, + "narfmap" + ] + ], + "versions_narfmap": [ + [ + "NARFMAP_HASHTABLE", + "narfmap", + "1.4.2" + ] + ] + } ], + "timestamp": "2026-07-27T20:57:35.523796947", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2023-12-15T17:42:36.677592114" + "nf-test": "0.9.5", + "nextflow": "25.10.2" + } }, "sarscov2 - fasta": { "content": [ - "narfmap", - "versions.yml" + { + "hashmap": [ + [ + { + "id": "test" + }, + "narfmap" + ] + ], + "versions_narfmap": [ + [ + "NARFMAP_HASHTABLE", + "narfmap", + "1.4.2" + ] + ] + } ], + "timestamp": "2026-07-27T20:57:28.790746269", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2023-12-15T17:42:32.074476297" + "nf-test": "0.9.5", + "nextflow": "25.10.2" + } } -} \ No newline at end of file +}