Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 6 additions & 15 deletions modules/nf-core/hmtnote/annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,26 @@ process HMTNOTE_ANNOTATE {
tuple val(meta), path(vcf)

output:
tuple val(meta), path("*_annotated.vcf"), emit: vcf
path "versions.yml" , emit: versions
tuple val(meta), path("${prefix}.vcf"), emit: vcf
tuple val("${task.process}"), val("hmtnote"), eval("hmtnote --version | sed 's/^.*hmtnote, version //'"), emit: versions_hmtnote, topic: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
prefix = task.ext.prefix ?: "${meta.id}"

"""
hmtnote \\
annotate \\
$vcf \\
${prefix}_annotated.vcf \\
${prefix}.vcf \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_annotated.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
touch ${prefix}.vcf
"""
}
34 changes: 24 additions & 10 deletions modules/nf-core/hmtnote/annotate/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hmtnote_annotate
description: Human mitochondrial variants annotation using HmtVar. Contains .plk file
with annotation, so can be run offline
description: Human mitochondrial variants annotation using HmtVar. Contains .plk
file with annotation, so can be run offline
keywords:
- hmtnote
- mitochondria
Expand Down Expand Up @@ -29,18 +29,32 @@ output:
type: map
description: |
Groovy Map containing sample information
- "*_annotated.vcf":
- "${prefix}.vcf":
type: file
description: annotated vcf
pattern: "*_annotated.vcf"
pattern: "*.vcf"
ontologies: []
versions_hmtnote:
- - ${task.process}:
type: string
description: Name of the process
- hmtnote:
type: string
description: Name of the tool
- "hmtnote --version | sed 's/^.*hmtnote, version //'":
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: Name of the process
- hmtnote:
type: string
description: Name of the tool
- "hmtnote --version | sed 's/^.*hmtnote, version //'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@sysbiocoder"
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/hmtnote/annotate/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nextflow_process {
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions
process.out.findAll {key, value -> key.startsWith("versions")}
).match()
}
)
Expand Down
46 changes: 30 additions & 16 deletions modules/nf-core/hmtnote/annotate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,56 @@
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.vcf:md5,8e722884ffb75155212a3fc053918766"
]
],
"1": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
[
"HMTNOTE_ANNOTATE",
"hmtnote",
"0.7.2"
]
],
"vcf": [
[
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.vcf:md5,8e722884ffb75155212a3fc053918766"
]
],
"versions": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
"versions_hmtnote": [
[
"HMTNOTE_ANNOTATE",
"hmtnote",
"0.7.2"
]
]
}
],
"timestamp": "2026-02-16T15:50:52.013649",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-15T13:43:56.953856721"
"nf-test": "0.9.4",
"nextflow": "25.10.2"
}
},
"sarscov2": {
"content": [
"98d1056442ec88659f26dfb1251b6f74",
[
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
]
{
"versions_hmtnote": [
[
"HMTNOTE_ANNOTATE",
"hmtnote",
"0.7.2"
]
]
}
],
"timestamp": "2026-02-16T16:05:54.919448",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-15T13:43:44.674273215"
"nf-test": "0.9.4",
"nextflow": "25.10.2"
}
}
}
Loading