Skip to content

Commit a064a2c

Browse files
mapo9mapo9mribeirodantasnvnieuwk
authored
adding topics channel to tabix_tabix (#9267)
* adding topics channel * nf-test * lint meta yml * redo meta.yml * remove dup * remove tabix version * remove tabix versions from subworkflows * fix test * update snapshot * fix snapshots subworkflows * missed one subworkflow * more subworkflows * last (?) subworkflow * harshils alignmnent * too enthusiatic when removing * snaphots because bgzip versions are back * fix topics syntax for linting * Revert "fix topics syntax for linting" This reverts commit 0d25630. * version syntax changed in test * remove newline * Update modules/nf-core/tabix/tabix/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update modules/nf-core/tabix/tabix/meta.yml Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * snapshot for new version_tabix name --------- Co-authored-by: mapo9 <[email protected]> Co-authored-by: Marcel Ribeiro-Dantas <[email protected]> Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
1 parent 51cd38b commit a064a2c

File tree

12 files changed

+233
-178
lines changed

12 files changed

+233
-178
lines changed

modules/nf-core/tabix/tabix/main.nf

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ process TABIX_TABIX {
1111
tuple val(meta), path(tab)
1212

1313
output:
14-
tuple val(meta), path("*.tbi"), optional:true, emit: tbi
15-
tuple val(meta), path("*.csi"), optional:true, emit: csi
16-
path "versions.yml" , emit: versions
14+
tuple val(meta), path("*.tbi") , optional:true , emit: tbi
15+
tuple val(meta), path("*.csi") , optional:true , emit: csi
16+
tuple val("${task.process}"), val('tabix'), eval("tabix -h 2>&1 | grep -oP 'Version:\\s*\\K[^\\s]+'") , topic: versions , emit: versions_tabix
1717

1818
when:
1919
task.ext.when == null || task.ext.when
@@ -26,20 +26,10 @@ process TABIX_TABIX {
2626
$args \\
2727
$tab
2828
29-
cat <<-END_VERSIONS > versions.yml
30-
"${task.process}":
31-
tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
32-
END_VERSIONS
3329
"""
34-
3530
stub:
3631
"""
3732
touch ${tab}.tbi
3833
touch ${tab}.csi
39-
40-
cat <<-END_VERSIONS > versions.yml
41-
"${task.process}":
42-
tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
43-
END_VERSIONS
4434
"""
4535
}

modules/nf-core/tabix/tabix/meta.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,27 @@ output:
4646
description: coordinate sorted index file
4747
pattern: "*.{csi}"
4848
ontologies: []
49-
versions:
50-
- versions.yml:
51-
type: file
52-
description: File containing software versions
53-
pattern: "versions.yml"
54-
ontologies:
55-
- edam: http://edamontology.org/format_3750 # YAML
49+
versions_tabix:
50+
- - ${task.process}:
51+
type: string
52+
description: The process the versions were collected from
53+
- tabix:
54+
type: string
55+
description: The tool name
56+
- tabix -h 2>&1 | tail -1:
57+
type: string
58+
description: The command used to generate the version of the tool
59+
topics:
60+
- versions:
61+
- - process:
62+
type: string
63+
description: The process the versions were collected from
64+
- tool:
65+
type: string
66+
description: The tool name
67+
- version:
68+
type: string
69+
description: The version of the tool
5670
authors:
5771
- "@joseespinosa"
5872
- "@drpatelh"

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ nextflow_process {
2727
{ assert process.success },
2828
{ assert snapshot(
2929
process.out,
30-
file(process.out.tbi[0][1]).name
30+
file(process.out.tbi[0][1]).name,
31+
process.out.findAll { key, val -> key.startsWith("versions")}
3132
).match() }
3233
)
3334
}
@@ -51,7 +52,9 @@ nextflow_process {
5152
{ assert process.success },
5253
{ assert snapshot(
5354
process.out,
54-
file(process.out.tbi[0][1]).name).match() }
55+
file(process.out.tbi[0][1]).name,
56+
process.out.findAll { key, val -> key.startsWith("versions")}
57+
).match() }
5558
)
5659
}
5760

@@ -75,7 +78,8 @@ nextflow_process {
7578
{ assert process.success },
7679
{ assert snapshot(
7780
process.out,
78-
file(process.out.tbi[0][1]).name
81+
file(process.out.tbi[0][1]).name,
82+
process.out.findAll { key, val -> key.startsWith("versions")}
7983
).match() }
8084
)
8185
}
@@ -100,7 +104,8 @@ nextflow_process {
100104
{ assert process.success },
101105
{ assert snapshot(
102106
process.out,
103-
file(process.out.csi[0][1]).name
107+
file(process.out.csi[0][1]).name,
108+
process.out.findAll { key, val -> key.startsWith("versions")}
104109
).match() }
105110
)
106111
}
@@ -126,11 +131,11 @@ nextflow_process {
126131
{ assert process.success },
127132
{ assert snapshot(
128133
process.out,
129-
file(process.out.csi[0][1]).name
134+
file(process.out.csi[0][1]).name,
135+
process.out.findAll { key, val -> key.startsWith("versions")}
130136
).match() }
131137
)
132138
}
133-
134139
}
135140

136141
}

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

Lines changed: 120 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515
],
1616
"2": [
17-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
17+
[
18+
"TABIX_TABIX",
19+
"tabix",
20+
"1.21"
21+
]
1822
],
1923
"csi": [
2024

@@ -27,17 +31,30 @@
2731
"genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926"
2832
]
2933
],
30-
"versions": [
31-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
34+
"versions_tabix": [
35+
[
36+
"TABIX_TABIX",
37+
"tabix",
38+
"1.21"
39+
]
3240
]
3341
},
34-
"genome.gff3.gz.tbi"
42+
"genome.gff3.gz.tbi",
43+
{
44+
"versions_tabix": [
45+
[
46+
"TABIX_TABIX",
47+
"tabix",
48+
"1.21"
49+
]
50+
]
51+
}
3552
],
3653
"meta": {
37-
"nf-test": "0.9.2",
38-
"nextflow": "24.10.5"
54+
"nf-test": "0.9.3",
55+
"nextflow": "25.10.0"
3956
},
40-
"timestamp": "2025-03-26T13:52:48.638506004"
57+
"timestamp": "2025-10-29T15:30:55.967501479"
4158
},
4259
"sarscov2_bedgz_tbi": {
4360
"content": [
@@ -54,7 +71,11 @@
5471

5572
],
5673
"2": [
57-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
74+
[
75+
"TABIX_TABIX",
76+
"tabix",
77+
"1.21"
78+
]
5879
],
5980
"csi": [
6081

@@ -67,17 +88,30 @@
6788
"test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d"
6889
]
6990
],
70-
"versions": [
71-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
91+
"versions_tabix": [
92+
[
93+
"TABIX_TABIX",
94+
"tabix",
95+
"1.21"
96+
]
7297
]
7398
},
74-
"test.bed.gz.tbi"
99+
"test.bed.gz.tbi",
100+
{
101+
"versions_tabix": [
102+
[
103+
"TABIX_TABIX",
104+
"tabix",
105+
"1.21"
106+
]
107+
]
108+
}
75109
],
76110
"meta": {
77-
"nf-test": "0.9.2",
78-
"nextflow": "24.10.5"
111+
"nf-test": "0.9.3",
112+
"nextflow": "25.10.0"
79113
},
80-
"timestamp": "2025-03-26T13:52:44.910707349"
114+
"timestamp": "2025-10-29T15:30:50.90188633"
81115
},
82116
"sarscov2_vcf_tbi": {
83117
"content": [
@@ -94,7 +128,11 @@
94128

95129
],
96130
"2": [
97-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
131+
[
132+
"TABIX_TABIX",
133+
"tabix",
134+
"1.21"
135+
]
98136
],
99137
"csi": [
100138

@@ -107,17 +145,30 @@
107145
"test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e"
108146
]
109147
],
110-
"versions": [
111-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
148+
"versions_tabix": [
149+
[
150+
"TABIX_TABIX",
151+
"tabix",
152+
"1.21"
153+
]
112154
]
113155
},
114-
"test.vcf.gz.tbi"
156+
"test.vcf.gz.tbi",
157+
{
158+
"versions_tabix": [
159+
[
160+
"TABIX_TABIX",
161+
"tabix",
162+
"1.21"
163+
]
164+
]
165+
}
115166
],
116167
"meta": {
117-
"nf-test": "0.9.2",
118-
"nextflow": "24.10.5"
168+
"nf-test": "0.9.3",
169+
"nextflow": "25.10.0"
119170
},
120-
"timestamp": "2025-03-26T13:52:52.405662623"
171+
"timestamp": "2025-10-29T15:31:00.935418897"
121172
},
122173
"sarscov2_vcf_csi_stub": {
123174
"content": [
@@ -139,7 +190,11 @@
139190
]
140191
],
141192
"2": [
142-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
193+
[
194+
"TABIX_TABIX",
195+
"tabix",
196+
"1.21"
197+
]
143198
],
144199
"csi": [
145200
[
@@ -157,17 +212,30 @@
157212
"test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
158213
]
159214
],
160-
"versions": [
161-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
215+
"versions_tabix": [
216+
[
217+
"TABIX_TABIX",
218+
"tabix",
219+
"1.21"
220+
]
162221
]
163222
},
164-
"test.vcf.gz.csi"
223+
"test.vcf.gz.csi",
224+
{
225+
"versions_tabix": [
226+
[
227+
"TABIX_TABIX",
228+
"tabix",
229+
"1.21"
230+
]
231+
]
232+
}
165233
],
166234
"meta": {
167-
"nf-test": "0.9.2",
168-
"nextflow": "24.10.5"
235+
"nf-test": "0.9.3",
236+
"nextflow": "25.10.0"
169237
},
170-
"timestamp": "2025-03-26T13:52:59.633992323"
238+
"timestamp": "2025-10-29T15:31:10.669125187"
171239
},
172240
"sarscov2_vcf_csi": {
173241
"content": [
@@ -184,7 +252,11 @@
184252
]
185253
],
186254
"2": [
187-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
255+
[
256+
"TABIX_TABIX",
257+
"tabix",
258+
"1.21"
259+
]
188260
],
189261
"csi": [
190262
[
@@ -197,16 +269,29 @@
197269
"tbi": [
198270

199271
],
200-
"versions": [
201-
"versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5"
272+
"versions_tabix": [
273+
[
274+
"TABIX_TABIX",
275+
"tabix",
276+
"1.21"
277+
]
202278
]
203279
},
204-
"test.vcf.gz.csi"
280+
"test.vcf.gz.csi",
281+
{
282+
"versions_tabix": [
283+
[
284+
"TABIX_TABIX",
285+
"tabix",
286+
"1.21"
287+
]
288+
]
289+
}
205290
],
206291
"meta": {
207-
"nf-test": "0.9.2",
208-
"nextflow": "24.10.5"
292+
"nf-test": "0.9.3",
293+
"nextflow": "25.10.0"
209294
},
210-
"timestamp": "2025-03-26T13:52:56.083553332"
295+
"timestamp": "2025-10-29T15:31:05.605794542"
211296
}
212297
}

subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ workflow VCF_ANNOTATE_ENSEMBLVEP {
3434

3535
// Gather versions of all tools used
3636
ch_versions = ch_versions.mix(ENSEMBLVEP_VEP.out.versions)
37-
ch_versions = ch_versions.mix(TABIX_TABIX.out.versions)
3837

3938
emit:
4039
vcf_tbi = ch_vcf_tbi // channel: [ val(meta), path(vcf), path(tbi) ]

0 commit comments

Comments
 (0)