Skip to content
Merged
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
14 changes: 2 additions & 12 deletions modules/nf-core/haplogrep3/classify/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process HAPLOGREP3_CLASSIFY {
tuple val(meta), path(inputfile)

output:
tuple val(meta), path("*.txt"), emit: txt
path "versions.yml" , emit: versions
tuple val(meta) , path("*.txt") , emit: txt
tuple val("${task.process}"), val('haplogrep3'), eval("haplogrep3 | sed -n 's/.*Haplogrep 3 \\([0-9.]\\+\\).*/\\1/p'"), emit: versions_haplogrep3, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,22 +26,12 @@ process HAPLOGREP3_CLASSIFY {
$args \\
--in $inputfile \\
--out ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
haplogrep3: \$(echo \$(haplogrep3 2>&1) | (sed '2!d') | (sed 's/Haplogrep 3 //'))
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
haplogrep3: \$(echo \$(haplogrep3 2>&1) | (sed '2!d') | (sed 's/Haplogrep 3 //'))
END_VERSIONS
"""

}
26 changes: 20 additions & 6 deletions modules/nf-core/haplogrep3/classify/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,27 @@ output:
description: text file with classification information
pattern: "*.{txt}"
ontologies: []
versions_haplogrep3:
- - ${task.process}:
type: string
description: The process the versions were collected from
- haplogrep3:
type: string
description: The tool name
- haplogrep3 | sed -n 's/.*Haplogrep 3 \\([0-9.]\\+\\':
type: string
description: The command used to generate 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 process the versions were collected from
- haplogrep3:
type: string
description: The tool name
- haplogrep3 | sed -n 's/.*Haplogrep 3 \\([0-9.]\\+\\':
type: string
description: The command used to generate the version of the tool
authors:
- "@lucpen"
maintainers:
Expand Down
40 changes: 28 additions & 12 deletions modules/nf-core/haplogrep3/classify/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
]
],
"1": [
"versions.yml:md5,bd62c94d9b52732b89fbd979ded94a60"
[
"HAPLOGREP3_CLASSIFY",
"haplogrep3",
"3.2.2"
]
],
"txt": [
[
Expand All @@ -23,16 +27,20 @@
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,bd62c94d9b52732b89fbd979ded94a60"
"versions_haplogrep3": [
[
"HAPLOGREP3_CLASSIFY",
"haplogrep3",
"3.2.2"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.3"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-01-28T15:34:35.106097277"
"timestamp": "2025-12-08T14:14:20.562672125"
},
"test-haplogrep3-classify": {
"content": [
Expand All @@ -47,7 +55,11 @@
]
],
"1": [
"versions.yml:md5,bd62c94d9b52732b89fbd979ded94a60"
[
"HAPLOGREP3_CLASSIFY",
"haplogrep3",
"3.2.2"
]
],
"txt": [
[
Expand All @@ -58,15 +70,19 @@
"test.txt:md5,fb242df629aa6168371d1d742f0fb179"
]
],
"versions": [
"versions.yml:md5,bd62c94d9b52732b89fbd979ded94a60"
"versions_haplogrep3": [
[
"HAPLOGREP3_CLASSIFY",
"haplogrep3",
"3.2.2"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.3"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-01-28T15:36:19.954363253"
"timestamp": "2025-12-08T14:14:10.117489085"
}
}
Loading