Skip to content

Commit 1f61348

Browse files
authored
Update tests bwameth/index (#11187)
Update tests
1 parent fbcb1dd commit 1f61348

File tree

3 files changed

+15
-60
lines changed

3 files changed

+15
-60
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ process BWAMETH_INDEX {
1313

1414
output:
1515
tuple val(meta), path("BwamethIndex"), emit: index
16-
tuple val("${task.process}"), val('bwameth'), eval('bwameth.py --version | cut -f2 -d\' \''), emit: versions_bwameth_index, topic: versions
16+
tuple val("${task.process}"), val('bwameth'), eval("bwameth.py --version | cut -f2 -d' '"), emit: versions_bwameth_index, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
2020

2121
script:
2222
def index_cmd = use_mem2 ? "index-mem2" : "index"
2323
"""
24-
2524
bwameth.py ${index_cmd} ${fasta}
2625
2726
rm $fasta

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ nextflow_process {
1515
when {
1616
process {
1717
"""
18-
input[0] = Channel.of([
19-
[ id:'test' ], // meta map
18+
input[0] = channel.of([
19+
[ id:'test' ],
2020
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
2121
])
2222
input[1] = false
@@ -27,7 +27,7 @@ nextflow_process {
2727
then {
2828
assertAll(
2929
{ assert process.success },
30-
{ assert snapshot(process.out).match() }
30+
{ assert snapshot(sanitizeOutput(process.out)).match() }
3131
)
3232
}
3333
}
@@ -37,8 +37,8 @@ nextflow_process {
3737
when {
3838
process {
3939
"""
40-
input[0] = Channel.of([
41-
[ id:'test' ], // meta map
40+
input[0] = channel.of([
41+
[ id:'test' ],
4242
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
4343
])
4444
input[1] = true
@@ -49,7 +49,7 @@ nextflow_process {
4949
then {
5050
assertAll(
5151
{ assert process.success },
52-
{ assert snapshot(process.out).match() }
52+
{ assert snapshot(sanitizeOutput(process.out)).match() }
5353
)
5454
}
5555
}

modules/nf-core/bwameth/index/tests/main.nf.test.snap

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22
"sarscov2 genome [fasta] - mem2": {
33
"content": [
44
{
5-
"0": [
6-
[
7-
{
8-
"id": "test"
9-
},
10-
[
11-
"genome.fasta.bwameth.c2t:md5,98039984526a41d04d6bd92fcc040c62",
12-
"genome.fasta.bwameth.c2t.0123:md5,1b92d7081e7b54dafcd97aac45a8076d",
13-
"genome.fasta.bwameth.c2t.amb:md5,249a4195069071ce47cd0bae68abe376",
14-
"genome.fasta.bwameth.c2t.ann:md5,46524d4359dcdfb203a235ab3b930dbb",
15-
"genome.fasta.bwameth.c2t.bwt.2bit.64:md5,52fa820b3a029fe6a9b2e18972f616f2",
16-
"genome.fasta.bwameth.c2t.pac:md5,4d8e51cb0bbdeaf24576bdf0264d8653"
17-
]
18-
]
19-
],
20-
"1": [
21-
[
22-
"BWAMETH_INDEX",
23-
"bwameth",
24-
"0.2.9"
25-
]
26-
],
275
"index": [
286
[
297
{
@@ -48,37 +26,15 @@
4826
]
4927
}
5028
],
29+
"timestamp": "2026-04-14T18:39:35.811012862",
5130
"meta": {
52-
"nf-test": "0.9.2",
53-
"nextflow": "25.10.3"
54-
},
55-
"timestamp": "2026-03-12T10:58:49.062626304"
31+
"nf-test": "0.9.5",
32+
"nextflow": "25.10.4"
33+
}
5634
},
5735
"sarscov2 genome [fasta]": {
5836
"content": [
5937
{
60-
"0": [
61-
[
62-
{
63-
"id": "test"
64-
},
65-
[
66-
"genome.fasta.bwameth.c2t:md5,98039984526a41d04d6bd92fcc040c62",
67-
"genome.fasta.bwameth.c2t.amb:md5,249a4195069071ce47cd0bae68abe376",
68-
"genome.fasta.bwameth.c2t.ann:md5,46524d4359dcdfb203a235ab3b930dbb",
69-
"genome.fasta.bwameth.c2t.bwt:md5,84f65df7d42dbe84c9ccfaddfdd5ea6b",
70-
"genome.fasta.bwameth.c2t.pac:md5,4d8e51cb0bbdeaf24576bdf0264d8653",
71-
"genome.fasta.bwameth.c2t.sa:md5,d25f6486f5134f57ed5b258f6fbb8673"
72-
]
73-
]
74-
],
75-
"1": [
76-
[
77-
"BWAMETH_INDEX",
78-
"bwameth",
79-
"0.2.9"
80-
]
81-
],
8238
"index": [
8339
[
8440
{
@@ -103,10 +59,10 @@
10359
]
10460
}
10561
],
62+
"timestamp": "2026-04-14T18:39:27.16458196",
10663
"meta": {
107-
"nf-test": "0.9.2",
108-
"nextflow": "25.10.3"
109-
},
110-
"timestamp": "2026-03-12T10:58:42.898455483"
64+
"nf-test": "0.9.5",
65+
"nextflow": "25.10.4"
66+
}
11167
}
11268
}

0 commit comments

Comments
 (0)