Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/nf-core/narfmap/align/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
55 changes: 30 additions & 25 deletions modules/nf-core/narfmap/align/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"id": "test",
"single_end": false
},
"test.bam:md5,05a72e1f017061967c1ecd95b4a11588"
"test.bam",
"aa68d3e5ae6049159a563b4ea76b4478"
]
],
[
Expand Down Expand Up @@ -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": {
Expand All @@ -56,7 +57,7 @@
"id": "test",
"single_end": false
},
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.bam"
]
],
[
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -143,7 +144,8 @@
"id": "test",
"single_end": true
},
"test.bam:md5,3a275f59c824a956f234166274fe1049"
"test.bam",
"79e88aecfd62264a1018cf6cb47e7e39"
]
],
[
Expand Down Expand Up @@ -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": {
Expand All @@ -192,7 +194,8 @@
"id": "test",
"single_end": true
},
"test.bam:md5,af2401d3a72f278a9c3546ad77ee2a40"
"test.bam",
"58ccb538a46099fb73b47c76dd737bdc"
]
],
[
Expand Down Expand Up @@ -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": {
Expand All @@ -241,7 +244,8 @@
"id": "test",
"single_end": false
},
"test.bam:md5,908b56dc99a1ca58af4d7d13bcba454e"
"test.bam",
"dcbfd5628b07cd75b0885f97d15cdd38"
]
],
[
Expand Down Expand Up @@ -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": {
Expand All @@ -290,7 +294,8 @@
"id": "test",
"single_end": false
},
"test.bam:md5,05a72e1f017061967c1ecd95b4a11588"
"test.bam",
"aa68d3e5ae6049159a563b4ea76b4478"
]
],
[
Expand Down Expand Up @@ -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"
}
}
}
}
6 changes: 4 additions & 2 deletions modules/nf-core/narfmap/align/tests/segfault.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
20 changes: 6 additions & 14 deletions modules/nf-core/narfmap/align/tests/segfault.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@
"id": "test",
"single_end": true
},
"test.bam:md5,4c3f0f32808e0b8e06b4bded09c1e17d"
"test.bam"
]
],
[
"decompHashTableCtxInit...",
"decompHashTableHeader...",
"decompHashTableLiterals...",
"decompHashTableExtIndex...",
"decompHashTableAutoHits...",
"decompHashTableSetFlags..."
],
{
"versions_narfmap": [
[
Expand All @@ -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"
}
}
}
}
14 changes: 2 additions & 12 deletions modules/nf-core/narfmap/hashtable/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
"""

}
26 changes: 20 additions & 6 deletions modules/nf-core/narfmap/hashtable/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 2 additions & 4 deletions modules/nf-core/narfmap/hashtable/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
)
Expand All @@ -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()
}
)
Expand Down
Loading
Loading