Skip to content

Commit 7da2e63

Browse files
authored
Fix Galah tests to remove checkm2 dependency and update to topic versions (#9857)
* fix: remove checkm2 dependency from galah * feat: galah to topic versions * lint
1 parent 8a013d3 commit 7da2e63

4 files changed

Lines changed: 81 additions & 79 deletions

File tree

modules/nf-core/galah/main.nf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ process GALAH {
1313
output:
1414
tuple val(meta), path("*.tsv") , emit: tsv
1515
tuple val(meta), path("${prefix}/*"), emit: dereplicated_bins
16-
path "versions.yml" , emit: versions
16+
tuple val("${task.process}"), val('galah'), eval('galah --version | sed "s/galah //"'), emit: versions_galah, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
@@ -37,11 +37,6 @@ process GALAH {
3737
--output-cluster-definition ${prefix}.tsv \\
3838
--output-representative-fasta-directory ${prefix} \\
3939
${args}
40-
41-
cat <<-END_VERSIONS > versions.yml
42-
"${task.process}":
43-
galah: \$(galah --version | sed 's/galah //')
44-
END_VERSIONS
4540
"""
4641

4742
stub:
@@ -50,10 +45,5 @@ process GALAH {
5045
mkdir ${prefix}/
5146
touch ${prefix}/test.fa
5247
touch ${prefix}.tsv
53-
54-
cat <<-END_VERSIONS > versions.yml
55-
"${task.process}":
56-
galah: \$(galah --version | sed 's/galah //')
57-
END_VERSIONS
5848
"""
5949
}

modules/nf-core/galah/meta.yml

Lines changed: 29 additions & 13 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: "galah"
32
description: Cluster genome FASTA files by average nucleotide identity
43
keywords:
@@ -14,7 +13,8 @@ tools:
1413
documentation: "https://github.com/wwood/galah"
1514
tool_dev_url: "https://github.com/wwood/galah"
1615
doi: "10.1111/NODOI"
17-
licence: ["GPL v3"]
16+
licence:
17+
- "GPL v3"
1818
identifier: ""
1919
input:
2020
- - meta:
@@ -39,8 +39,8 @@ input:
3939
retain the .fasta extension).
4040
pattern: "*.{csv,tsv}"
4141
ontologies:
42-
- edam: http://edamontology.org/format_3752 # CSV
43-
- edam: http://edamontology.org/format_3475 # TSV
42+
- edam: http://edamontology.org/format_3752
43+
- edam: http://edamontology.org/format_3475
4444
- qc_format:
4545
type: string
4646
description: Defines the type if input table in `qc_table`, if specified.
@@ -54,10 +54,11 @@ output:
5454
e.g. `[ id:'test', single_end:false ]`
5555
- "*.tsv":
5656
type: file
57-
description: TSV file in the format `representative_genome` \t `member_genome`
57+
description: TSV file in the format `representative_genome` \t
58+
`member_genome`
5859
pattern: "*.tsv"
5960
ontologies:
60-
- edam: http://edamontology.org/format_3475 # TSV
61+
- edam: http://edamontology.org/format_3475
6162
dereplicated_bins:
6263
- - meta:
6364
type: map
@@ -66,16 +67,31 @@ output:
6667
e.g. `[ id:'test', single_end:false ]`
6768
- ${prefix}/*:
6869
type: file
69-
description: The representative genomes following dereplication by galah.
70+
description: The representative genomes following dereplication by
71+
galah.
7072
pattern: "*"
7173
ontologies: []
74+
versions_galah:
75+
- - ${task.process}:
76+
type: string
77+
description: The name of the process
78+
- galah:
79+
type: string
80+
description: The name of the tool
81+
- galah --version | sed "s/galah //":
82+
type: eval
83+
description: The expression to obtain the version of the tool
84+
topics:
7285
versions:
73-
- versions.yml:
74-
type: file
75-
description: File containing software versions
76-
pattern: "versions.yml"
77-
ontologies:
78-
- edam: http://edamontology.org/format_3750 # YAML
86+
- - ${task.process}:
87+
type: string
88+
description: The name of the process
89+
- galah:
90+
type: string
91+
description: The name of the tool
92+
- galah --version | sed "s/galah //":
93+
type: eval
94+
description: The expression to obtain the version of the tool
7995
authors:
8096
- "@prototaxites"
8197
maintainers:

modules/nf-core/galah/tests/main.nf.test

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,38 +41,12 @@ nextflow_process {
4141
test("genomes - checkm2 qc_table") {
4242

4343
setup {
44-
run("UNTAR") {
45-
script "../../untar/main.nf"
46-
process {
47-
"""
48-
input[0] = channel
49-
.fromPath("https://zenodo.org/records/14897628/files/checkm2_database.tar.gz", checkIfExists: true)
50-
.map { dbfile -> [ [id: 'checkm2db'], dbfile ] }
51-
"""
52-
}
53-
}
54-
55-
run("CHECKM2_PREDICT") {
56-
script "../../checkm2/predict/main.nf"
57-
process {
58-
"""
59-
input[0] = [
60-
[ id:'test_checkm2' ], // meta map
61-
[file("https://github.com/nf-core/test-datasets/raw/refs/heads/magmap/testdata/GCA_002688505.1_ASM268850v1_genomic.fna.gz", checkIfExists: true),
62-
file("https://github.com/nf-core/test-datasets/raw/refs/heads/magmap/testdata/GCF_004296495.1_ASM429649v1_genomic.fna.gz", checkIfExists: true)]
63-
]
64-
input[1] = UNTAR.out.untar.map { meta, dir ->
65-
[ [id: 'checkm2db'], file("\${dir}/*.dmnd")]
66-
}
67-
"""
68-
}
69-
}
7044

7145
run("GAWK") {
7246
script "../../gawk/main.nf"
7347
process {
7448
"""
75-
input[0] = CHECKM2_PREDICT.out.checkm2_tsv
49+
input[0] = [[id: 'test'], file(params.modules_testdata_base_path + "delete_me/galah/checkm2_report.tsv", checkIfExists: true)]
7650
input[1] = []
7751
input[2] = false
7852
"""
@@ -83,16 +57,14 @@ nextflow_process {
8357
when {
8458
process {
8559
"""
86-
ch_checkm_tsv = GAWK.out.output
87-
| map { meta, tsv -> [ [id: "test"], tsv ] }
88-
8960
input[0] = Channel.of([
9061
[ id:'test' ], // meta map
9162
[file("https://github.com/nf-core/test-datasets/raw/refs/heads/magmap/testdata/GCA_002688505.1_ASM268850v1_genomic.fna.gz", checkIfExists: true),
9263
file("https://github.com/nf-core/test-datasets/raw/refs/heads/magmap/testdata/GCF_004296495.1_ASM429649v1_genomic.fna.gz", checkIfExists: true)]
9364
])
94-
.combine(ch_checkm_tsv, by: 0)
95-
.map { meta, bins, tsv -> [ meta, bins, tsv, "checkm2" ] }
65+
.combine(GAWK.out.output, by: 0)
66+
// rename 'test' to 'input' to avoid name collision
67+
.map { meta, bins, tsv -> [ meta + [id: "input"], bins, tsv, "checkm2" ] }
9668
"""
9769
}
9870
}

modules/nf-core/galah/tests/main.nf.test.snap

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"0": [
66
[
77
{
8-
"id": "test"
8+
"id": "input"
99
},
10-
"test.tsv:md5,d2f8a621bfa5794467f4fdd759e2bce7"
10+
"input.tsv:md5,d2f8a621bfa5794467f4fdd759e2bce7"
1111
]
1212
],
1313
"1": [
1414
[
1515
{
16-
"id": "test"
16+
"id": "input"
1717
},
1818
[
1919
"GCA_002688505.1_ASM268850v1_genomic.fna.gz:md5,fe93f30498a00395d0aa61ff51346df0",
@@ -22,12 +22,16 @@
2222
]
2323
],
2424
"2": [
25-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
25+
[
26+
"GALAH",
27+
"galah",
28+
"0.4.2"
29+
]
2630
],
2731
"dereplicated_bins": [
2832
[
2933
{
30-
"id": "test"
34+
"id": "input"
3135
},
3236
[
3337
"GCA_002688505.1_ASM268850v1_genomic.fna.gz:md5,fe93f30498a00395d0aa61ff51346df0",
@@ -38,21 +42,25 @@
3842
"tsv": [
3943
[
4044
{
41-
"id": "test"
45+
"id": "input"
4246
},
43-
"test.tsv:md5,d2f8a621bfa5794467f4fdd759e2bce7"
47+
"input.tsv:md5,d2f8a621bfa5794467f4fdd759e2bce7"
4448
]
4549
],
46-
"versions": [
47-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
50+
"versions_galah": [
51+
[
52+
"GALAH",
53+
"galah",
54+
"0.4.2"
55+
]
4856
]
4957
}
5058
],
5159
"meta": {
5260
"nf-test": "0.9.3",
53-
"nextflow": "25.10.2"
61+
"nextflow": "25.10.3"
5462
},
55-
"timestamp": "2026-01-26T09:42:27.663340879"
63+
"timestamp": "2026-02-03T14:04:36.622322"
5664
},
5765
"genomes - stub": {
5866
"content": [
@@ -74,7 +82,11 @@
7482
]
7583
],
7684
"2": [
77-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
85+
[
86+
"GALAH",
87+
"galah",
88+
"0.4.2"
89+
]
7890
],
7991
"dereplicated_bins": [
8092
[
@@ -92,16 +104,20 @@
92104
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
93105
]
94106
],
95-
"versions": [
96-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
107+
"versions_galah": [
108+
[
109+
"GALAH",
110+
"galah",
111+
"0.4.2"
112+
]
97113
]
98114
}
99115
],
100116
"meta": {
101-
"nf-test": "0.9.2",
102-
"nextflow": "24.10.3"
117+
"nf-test": "0.9.3",
118+
"nextflow": "25.10.3"
103119
},
104-
"timestamp": "2025-01-10T15:57:08.039293521"
120+
"timestamp": "2026-02-03T14:01:51.813402"
105121
},
106122
"genomes - no qc_table": {
107123
"content": [
@@ -126,7 +142,11 @@
126142
]
127143
],
128144
"2": [
129-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
145+
[
146+
"GALAH",
147+
"galah",
148+
"0.4.2"
149+
]
130150
],
131151
"dereplicated_bins": [
132152
[
@@ -147,15 +167,19 @@
147167
"test.tsv:md5,d2f8a621bfa5794467f4fdd759e2bce7"
148168
]
149169
],
150-
"versions": [
151-
"versions.yml:md5,6c652af133dffb7ad60778428b1e6f3e"
170+
"versions_galah": [
171+
[
172+
"GALAH",
173+
"galah",
174+
"0.4.2"
175+
]
152176
]
153177
}
154178
],
155179
"meta": {
156-
"nf-test": "0.9.2",
157-
"nextflow": "24.10.3"
180+
"nf-test": "0.9.3",
181+
"nextflow": "25.10.3"
158182
},
159-
"timestamp": "2025-01-10T15:56:46.806177387"
183+
"timestamp": "2026-02-03T14:01:40.278192"
160184
}
161185
}

0 commit comments

Comments
 (0)