Skip to content

Commit db578af

Browse files
authored
Update to topic magus/guidetree (#12132)
* Update to topic * Apply suggestion from @LouisLeNezet * Update meta
1 parent f2e8516 commit db578af

4 files changed

Lines changed: 99 additions & 40 deletions

File tree

modules/nf-core/magus/guidetree/main.nf

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ process MAGUS_GUIDETREE {
1212

1313
output:
1414
tuple val(meta), path("*.tree"), emit: tree
15-
path "versions.yml" , emit: versions
15+
tuple val("${task.process}"), val('magus'), eval('magus --version'), emit: versions_magus, topic: versions
1616

1717
when:
1818
task.ext.when == null || task.ext.when
@@ -22,26 +22,16 @@ process MAGUS_GUIDETREE {
2222
def prefix = task.ext.prefix ?: "${meta.id}"
2323
"""
2424
magus \\
25-
-np $task.cpus \\
26-
-i $fasta \\
25+
-np ${task.cpus} \\
26+
-i ${fasta} \\
2727
-o ${prefix}.tree \\
2828
--onlyguidetree TRUE \\
29-
$args
30-
31-
cat <<-END_VERSIONS > versions.yml
32-
"${task.process}":
33-
MAGUS: \$(magus --version)
34-
END_VERSIONS
29+
${args}
3530
"""
3631

3732
stub:
3833
def prefix = task.ext.prefix ?: "${meta.id}"
3934
"""
4035
touch ${prefix}.tree
41-
42-
cat <<-END_VERSIONS > versions.yml
43-
"${task.process}":
44-
MAGUS: \$(magus --version)
45-
END_VERSIONS
4636
"""
4737
}

modules/nf-core/magus/guidetree/meta.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
21
name: "magus_guidetree"
32
description: Multiple Sequence Alignment using Graph Clustering
43
keywords:
@@ -13,7 +12,8 @@ tools:
1312
documentation: "https://github.com/vlasmirnov/MAGUS"
1413
tool_dev_url: "https://github.com/vlasmirnov/MAGUS"
1514
doi: "10.1093/bioinformatics/btaa992"
16-
licence: ["MIT"]
15+
licence:
16+
- "MIT"
1717
identifier: biotools:magus
1818

1919
input:
@@ -42,12 +42,28 @@ output:
4242
pattern: "*.tree"
4343
ontologies:
4444
- edam: http://edamontology.org/format_2006 # PHYLOGENETIC TREE
45+
versions_magus:
46+
- - ${task.process}:
47+
type: string
48+
description: The name of the process
49+
- magus:
50+
type: string
51+
description: The name of the tool
52+
- magus --version:
53+
type: eval
54+
description: The expression to obtain the version of the tool
55+
56+
topics:
4557
versions:
46-
- versions.yml:
47-
type: file
48-
description: File containing software versions
49-
pattern: "versions.yml"
50-
ontologies:
51-
- edam: http://edamontology.org/format_3750 # YAML
58+
- - ${task.process}:
59+
type: string
60+
description: The name of the process
61+
- magus:
62+
type: string
63+
description: The name of the tool
64+
- magus --version:
65+
type: eval
66+
description: The expression to obtain the version of the tool
67+
5268
authors:
5369
- "@lrauschning"

modules/nf-core/magus/guidetree/tests/main.nf.test

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ nextflow_process {
1414
when {
1515
process {
1616
"""
17-
input[0] = [ [ id:'test' ], // meta map
18-
file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true)
19-
]
17+
input[0] = [
18+
[ id:'test' ],
19+
file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true)
20+
]
2021
"""
2122
}
2223
}
@@ -32,7 +33,28 @@ nextflow_process {
3233
{ assert path(process.out.tree[0][1]).getText().contains("1atx") },
3334
{ assert path(process.out.tree[0][1]).getText().contains("1sh1") },
3435
{ assert path(process.out.tree[0][1]).getText().contains("1bds") },
35-
{ assert snapshot(process.out.versions).match("versions") }
36+
{ assert snapshot(sanitizeOutput(process.out, unstableKeys:["tree"])).match() }
37+
)
38+
}
39+
}
40+
41+
test("setoxin - fasta -- stub") {
42+
options "-stub"
43+
when {
44+
process {
45+
"""
46+
input[0] = [
47+
[ id:'test' ],
48+
file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true)
49+
]
50+
"""
51+
}
52+
}
53+
54+
then {
55+
assertAll(
56+
{ assert process.success },
57+
{ assert snapshot(sanitizeOutput(process.out)).match() }
3658
)
3759
}
3860
}
Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,54 @@
11
{
2-
"versions": {
2+
"setoxin - fasta": {
33
"content": [
4-
[
5-
"versions.yml:md5,5a2ad92c9ea945c4bf4890f02ca2562f"
6-
]
4+
{
5+
"tree": [
6+
[
7+
{
8+
"id": "test"
9+
},
10+
"test.tree"
11+
]
12+
],
13+
"versions_magus": [
14+
[
15+
"MAGUS_GUIDETREE",
16+
"magus",
17+
"0.2.0"
18+
]
19+
]
20+
}
721
],
8-
"timestamp": "2024-03-28T18:25:41.292337485"
22+
"timestamp": "2026-06-22T22:01:53.406955105",
23+
"meta": {
24+
"nf-test": "0.9.5",
25+
"nextflow": "26.04.3"
26+
}
927
},
10-
"tree": {
28+
"setoxin - fasta -- stub": {
1129
"content": [
12-
[
13-
[
14-
{
15-
"id": "test"
16-
},
17-
"test.tree:md5,c742636229d166322a2824d409595738"
30+
{
31+
"tree": [
32+
[
33+
{
34+
"id": "test"
35+
},
36+
"test.tree:md5,d41d8cd98f00b204e9800998ecf8427e"
37+
]
38+
],
39+
"versions_magus": [
40+
[
41+
"MAGUS_GUIDETREE",
42+
"magus",
43+
"0.2.0"
44+
]
1845
]
19-
]
46+
}
2047
],
21-
"timestamp": "2024-03-28T18:25:41.226027114"
48+
"timestamp": "2026-06-22T21:48:03.41595829",
49+
"meta": {
50+
"nf-test": "0.9.5",
51+
"nextflow": "26.04.3"
52+
}
2253
}
2354
}

0 commit comments

Comments
 (0)