Skip to content

Commit dcbb35e

Browse files
committed
Adjust deacon/index based on PR feedback
1 parent 425f946 commit dcbb35e

File tree

4 files changed

+84
-15
lines changed

4 files changed

+84
-15
lines changed

modules/nf-core/deacon/index/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ process DEACON_INDEX {
1919

2020
script:
2121
def args = task.ext.args ?: ''
22-
def prefix = task.ext.prefix ?: "${fasta.baseName}"
22+
def prefix = task.ext.prefix ?: "${meta.id}"
2323
"""
2424
deacon \\
2525
index \\

modules/nf-core/deacon/index/meta.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords:
88
- genome
99
- reference
1010
- minimizer
11+
- decontamination
1112
tools:
1213
- "deacon":
1314
description: "Fast alignment-free sequence filter"
@@ -27,7 +28,7 @@ input:
2728
- fasta:
2829
type: file
2930
description: Input genome fasta file
30-
pattern: "*.{fasta,fa,fas,fna}"
31+
pattern: "*.{fasta,fasta.gz,fas,fas.gz,fa,fa.gz,fna,fna.gz}"
3132
ontologies:
3233
- edam: "http://edamontology.org/data_2044" # Sequence
3334
- edam: "http://edamontology.org/format_1929" # FASTA

modules/nf-core/deacon/index/tests/main.nf.test

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,36 @@ nextflow_process {
2525
then {
2626
assertAll(
2727
{ assert process.success },
28-
{ assert snapshot(process.out).match() }
28+
{ assert snapshot(
29+
process.out.index,
30+
process.out.versions.collect { path(it).yaml }
31+
).match()
32+
}
33+
)
34+
}
35+
36+
}
37+
38+
test("index sarscov2 - fasta gzipped") {
39+
40+
when {
41+
process {
42+
"""
43+
input[0] = [
44+
[ id:'test'],
45+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true)
46+
]
47+
"""
48+
}
49+
}
50+
51+
then {
52+
assertAll(
53+
{ assert process.success },
54+
{ assert snapshot(
55+
process.out,
56+
process.out.versions.collect{ path(it).yaml }
57+
).match() }
2958
)
3059
}
3160

@@ -49,10 +78,11 @@ nextflow_process {
4978
then {
5079
assertAll(
5180
{ assert process.success },
52-
{ assert snapshot(process.out).match() }
81+
{ assert snapshot(
82+
process.out,
83+
process.out.versions.collect{ path(it).yaml }
84+
).match() }
5385
)
5486
}
55-
5687
}
57-
5888
}
Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
{
22
"index sarscov2 - fasta": {
3+
"content": [
4+
[
5+
[
6+
{
7+
"id": "test"
8+
},
9+
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3"
10+
]
11+
],
12+
[
13+
{
14+
"DEACON_INDEX": {
15+
"deacon": "0.5.0"
16+
}
17+
}
18+
]
19+
],
20+
"meta": {
21+
"nf-test": "0.9.2",
22+
"nextflow": "25.04.3"
23+
},
24+
"timestamp": "2025-06-16T08:54:38.622063"
25+
},
26+
"index sarscov2 - fasta - stub": {
327
"content": [
428
{
529
"0": [
630
[
731
{
832
"id": "test"
933
},
10-
"genome.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3"
34+
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e"
1135
]
1236
],
1337
"1": [
@@ -18,29 +42,36 @@
1842
{
1943
"id": "test"
2044
},
21-
"genome.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3"
45+
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e"
2246
]
2347
],
2448
"versions": [
2549
"versions.yml:md5,60749febc4eaab16229dc078af00ea27"
2650
]
27-
}
51+
},
52+
[
53+
{
54+
"DEACON_INDEX": {
55+
"deacon": "0.5.0"
56+
}
57+
}
58+
]
2859
],
2960
"meta": {
3061
"nf-test": "0.9.2",
3162
"nextflow": "25.04.3"
3263
},
33-
"timestamp": "2025-06-15T23:31:07.423054"
64+
"timestamp": "2025-06-16T12:31:10.825365"
3465
},
35-
"index sarscov2 - fasta - stub": {
66+
"index sarscov2 - fasta gzipped": {
3667
"content": [
3768
{
3869
"0": [
3970
[
4071
{
4172
"id": "test"
4273
},
43-
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e"
74+
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3"
4475
]
4576
],
4677
"1": [
@@ -51,18 +82,25 @@
5182
{
5283
"id": "test"
5384
},
54-
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e"
85+
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3"
5586
]
5687
],
5788
"versions": [
5889
"versions.yml:md5,60749febc4eaab16229dc078af00ea27"
5990
]
60-
}
91+
},
92+
[
93+
{
94+
"DEACON_INDEX": {
95+
"deacon": "0.5.0"
96+
}
97+
}
98+
]
6199
],
62100
"meta": {
63101
"nf-test": "0.9.2",
64102
"nextflow": "25.04.3"
65103
},
66-
"timestamp": "2025-06-15T23:31:10.744238"
104+
"timestamp": "2025-06-16T12:31:07.212408"
67105
}
68106
}

0 commit comments

Comments
 (0)