Skip to content
Open
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
32 changes: 20 additions & 12 deletions modules/nf-core/hmtnote/annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,42 @@ process HMTNOTE_ANNOTATE {

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

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

script:
def deprecation_message = """
WARNING: This module has been deprecated.

Reason:
This tool is no longer maintained by its author and, as its database hosting service has
been discontinued, it can no longer work with conda.
"""
assert false: deprecation_message
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
${args}
"""

stub:
def deprecation_message = """
WARNING: This module has been deprecated.

Reason:
This tool is no longer maintained by its author and, as its database hosting service has
been discontinued, it can no longer work with conda.
"""
assert false: deprecation_message
def 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
"""
}
34 changes: 25 additions & 9 deletions modules/nf-core/hmtnote/annotate/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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
deprecated: true
keywords:
- hmtnote
- mitochondria
Expand All @@ -11,7 +12,8 @@ tools:
homepage: https://github.com/robertopreste/HmtNote
documentation: https://hmtnote.readthedocs.io/en/latest/usage.html
doi: "10.1101/600619"
licence: ["MIT"]
licence:
- "MIT"
identifier: ""
input:
- - meta:
Expand All @@ -34,13 +36,27 @@ output:
description: annotated vcf
pattern: "*_annotated.vcf"
ontologies: []
versions_hmtnote:
- - ${task.process}:
type: string
description: The name of the process
- hmtnote:
type: string
description: The name of the tool
- hmtnote --version 2>&1 | sed 's/.*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: The name of the process
- hmtnote:
type: string
description: The name of the tool
- hmtnote --version 2>&1 | sed 's/.*version //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@sysbiocoder"
maintainers:
Expand Down
17 changes: 9 additions & 8 deletions modules/nf-core/hmtnote/annotate/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ nextflow_process {
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert process.failed },
{ assert process.errorReport.contains("WARNING: This module has been deprecated.")}
/*{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions
).match()
}
process.out.findAll { key, val -> key.startsWith('versions') }
).match()}*/
)
}
}
Expand All @@ -52,15 +52,16 @@ nextflow_process {
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert process.failed },
{ assert process.errorReport.contains("WARNING: This module has been deprecated.")}
/*{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }*/
)
}
}
Expand Down
45 changes: 22 additions & 23 deletions modules/nf-core/hmtnote/annotate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,46 @@
"sarscov2 - stub": {
"content": [
{
"0": [
"vcf": [
[
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
],
"vcf": [
"versions_hmtnote": [
[
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
"HMTNOTE_ANNOTATE",
"hmtnote",
"0.7.2"
]
],
"versions": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
]
}
],
"timestamp": "2026-05-19T17:52:47.633542465",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-15T13:43:56.953856721"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"sarscov2": {
"content": [
"98d1056442ec88659f26dfb1251b6f74",
[
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
]
{
"versions_hmtnote": [
[
"HMTNOTE_ANNOTATE",
"hmtnote",
"0.7.2"
]
]
}
],
"timestamp": "2026-05-19T17:52:32.708662033",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
},
"timestamp": "2025-05-15T13:43:44.674273215"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/hmtnote/annotate/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: HMTNOTE_ANNOTATE {
ext.args =params.module_args
ext.args = params.module_args
}
}
Loading