Skip to content

Commit 6e37577

Browse files
saramonzonbruno.ariano
authored andcommitted
Fixed ivar modules (nf-core#7868)
* fixed ivar variants module * updated snapshot ivar variants because versions change * fixed ivar consensus module * simplified snapshot for consensus test, same as ivar variants module * simplified snapshot for trim test, same as ivar variants module * updated snapshot for ivar trim and consensus modules * removed empty log file in ivar trim in snapshot * updated ivar version to last one * updated version also in conda env * updated version also in conda env in ivar consensus and variants * updated container version for ivar consensus and variants * updated snapshots again
1 parent da6e525 commit 6e37577

11 files changed

Lines changed: 115 additions & 92 deletions

File tree

modules/nf-core/ivar/consensus/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- bioconda::ivar=1.4.3
7+
- bioconda::ivar=1.4.4

modules/nf-core/ivar/consensus/main.nf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ process IVAR_CONSENSUS {
44

55
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/ivar:1.4.3--h43eeafb_0' :
8-
'biocontainers/ivar:1.4.3--h43eeafb_0' }"
7+
'https://depot.galaxyproject.org/singularity/ivar:1.4.4--h077b44d_0' :
8+
'biocontainers/ivar:1.4.4--h077b44d_0' }"
99

1010
input:
1111
tuple val(meta), path(bam)
@@ -40,7 +40,7 @@ process IVAR_CONSENSUS {
4040
4141
cat <<-END_VERSIONS > versions.yml
4242
"${task.process}":
43-
ivar: \$(echo \$(ivar version 2>&1) | sed 's/^.*iVar version //; s/ .*\$//')
43+
ivar: \$(ivar version | sed -n 's|iVar version \\(.*\\)|\\1|p')
4444
END_VERSIONS
4545
"""
4646

@@ -54,7 +54,7 @@ process IVAR_CONSENSUS {
5454
5555
cat <<-END_VERSIONS > versions.yml
5656
"${task.process}":
57-
ivar: \$(echo \$(ivar version 2>&1) | sed 's/^.*iVar version //; s/ .*\$//')
57+
ivar: \$(ivar version | sed -n 's|iVar version \\(.*\\)|\\1|p')
5858
END_VERSIONS
5959
"""
60-
}
60+
}

modules/nf-core/ivar/consensus/tests/main.nf.test

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ nextflow_process {
3030
then {
3131
assertAll(
3232
{ assert process.success },
33-
{ assert snapshot(
34-
process.out.fasta,
35-
file(process.out.qual[0][1]).name, // empty
36-
process.out.mpileup,
37-
process.out.versions,
38-
file(process.out.versions[0]).readLines().collect { it.trim() } // Trap to catch conda version mismatches
39-
).match()
33+
{ assert snapshot(snapshot(process.out).match())
4034
}
4135
)
4236
}

modules/nf-core/ivar/consensus/tests/main.nf.test.snap

Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
]
2828
],
2929
"3": [
30-
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3"
30+
"versions.yml:md5,93e160d2444b241c4ab6b58a46eb3be5"
3131
],
3232
"fasta": [
3333
[
@@ -54,15 +54,15 @@
5454
]
5555
],
5656
"versions": [
57-
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3"
57+
"versions.yml:md5,93e160d2444b241c4ab6b58a46eb3be5"
5858
]
5959
}
6060
],
6161
"meta": {
62-
"nf-test": "0.9.0",
63-
"nextflow": "24.04.4"
62+
"nf-test": "0.9.2",
63+
"nextflow": "24.10.5"
6464
},
65-
"timestamp": "2024-09-06T14:58:57.447441"
65+
"timestamp": "2025-03-20T16:33:42.030017475"
6666
},
6767
"test-ivar-consensus-mpileup": {
6868
"content": [
@@ -77,41 +77,68 @@
7777
"test.qual.txt",
7878
"test.mpileup",
7979
[
80-
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3"
80+
"versions.yml:md5,93e160d2444b241c4ab6b58a46eb3be5"
8181
]
8282
],
8383
"meta": {
84-
"nf-test": "0.9.0",
85-
"nextflow": "24.04.4"
84+
"nf-test": "0.9.2",
85+
"nextflow": "24.10.5"
8686
},
87-
"timestamp": "2024-09-06T14:58:52.938906"
87+
"timestamp": "2025-03-20T16:33:37.895144244"
8888
},
8989
"test-ivar-consensus": {
9090
"content": [
91-
[
92-
[
93-
{
94-
"id": "test"
95-
},
96-
"test.fa:md5,9e21a64818f4302b4dece5480fa5e8b8"
91+
{
92+
"0": [
93+
[
94+
{
95+
"id": "test"
96+
},
97+
"test.fa:md5,9e21a64818f4302b4dece5480fa5e8b8"
98+
]
99+
],
100+
"1": [
101+
[
102+
{
103+
"id": "test"
104+
},
105+
"test.qual.txt:md5,68b329da9893e34099c7d8ad5cb9c940"
106+
]
107+
],
108+
"2": [
109+
110+
],
111+
"3": [
112+
"versions.yml:md5,93e160d2444b241c4ab6b58a46eb3be5"
113+
],
114+
"fasta": [
115+
[
116+
{
117+
"id": "test"
118+
},
119+
"test.fa:md5,9e21a64818f4302b4dece5480fa5e8b8"
120+
]
121+
],
122+
"mpileup": [
123+
124+
],
125+
"qual": [
126+
[
127+
{
128+
"id": "test"
129+
},
130+
"test.qual.txt:md5,68b329da9893e34099c7d8ad5cb9c940"
131+
]
132+
],
133+
"versions": [
134+
"versions.yml:md5,93e160d2444b241c4ab6b58a46eb3be5"
97135
]
98-
],
99-
"test.qual.txt",
100-
[
101-
102-
],
103-
[
104-
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3"
105-
],
106-
[
107-
"\"IVAR_CONSENSUS\":",
108-
"ivar: 1.4.3"
109-
]
136+
}
110137
],
111138
"meta": {
112-
"nf-test": "0.9.0",
113-
"nextflow": "24.04.4"
139+
"nf-test": "0.9.2",
140+
"nextflow": "24.10.5"
114141
},
115-
"timestamp": "2024-09-06T14:58:48.289344"
142+
"timestamp": "2025-03-20T16:33:33.78389711"
116143
}
117144
}

modules/nf-core/ivar/trim/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- bioconda::ivar=1.4.3
7+
- bioconda::ivar=1.4.4

modules/nf-core/ivar/trim/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ process IVAR_TRIM {
44

55
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/ivar:1.4.3--h43eeafb_0' :
8-
'biocontainers/ivar:1.4.3--h43eeafb_0' }"
7+
'https://depot.galaxyproject.org/singularity/ivar:1.4.4--h077b44d_0' :
8+
'biocontainers/ivar:1.4.4--h077b44d_0' }"
99

1010
input:
1111
tuple val(meta), path(bam), path(bai)

modules/nf-core/ivar/trim/tests/main.nf.test

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ nextflow_process {
3030
assertAll(
3131
{ assert process.success },
3232
{ assert snapshot(
33-
bam(process.out.bam[0][1]).getHeaderMD5(),
34-
file(process.out.log[0][1]).name,
35-
process.out.versions,
36-
file(process.out.versions[0]).readLines().collect { it.trim() } // Versions trap to detect conda version mismatches
37-
).match()
38-
}
33+
process.out.bam,
34+
process.out.versions,
35+
file(process.out.log.get(0).get(1)).exists()
36+
).match()
37+
}
3938
)
4039
}
4140
}

modules/nf-core/ivar/trim/tests/main.nf.test.snap

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
]
2020
],
2121
"2": [
22-
"versions.yml:md5,0866f2f803515965fa4e60e75e03142f"
22+
"versions.yml:md5,ce9bc7a85135fcf3ce1b8fcd3640dac7"
2323
],
2424
"bam": [
2525
[
@@ -38,32 +38,35 @@
3838
]
3939
],
4040
"versions": [
41-
"versions.yml:md5,0866f2f803515965fa4e60e75e03142f"
41+
"versions.yml:md5,ce9bc7a85135fcf3ce1b8fcd3640dac7"
4242
]
4343
}
4444
],
4545
"meta": {
46-
"nf-test": "0.9.0",
47-
"nextflow": "24.04.4"
46+
"nf-test": "0.9.2",
47+
"nextflow": "24.10.5"
4848
},
49-
"timestamp": "2024-09-02T15:46:42.599707"
49+
"timestamp": "2025-03-20T15:10:51.503250953"
5050
},
5151
"test-ivar-trim": {
5252
"content": [
53-
"d0bf0e583be8d38f496559d0abbcc18a",
54-
"test.ivar.log",
5553
[
56-
"versions.yml:md5,0866f2f803515965fa4e60e75e03142f"
54+
[
55+
{
56+
"id": "test"
57+
},
58+
"test.bam:md5,0b6d8da44f8257e29d1c14590dbbf95b"
59+
]
5760
],
5861
[
59-
"\"IVAR_TRIM\":",
60-
"ivar: 1.4.3"
61-
]
62+
"versions.yml:md5,ce9bc7a85135fcf3ce1b8fcd3640dac7"
63+
],
64+
true
6265
],
6366
"meta": {
64-
"nf-test": "0.9.0",
65-
"nextflow": "24.04.4"
67+
"nf-test": "0.9.2",
68+
"nextflow": "24.10.5"
6669
},
67-
"timestamp": "2024-09-02T15:46:38.232175"
70+
"timestamp": "2025-03-20T15:10:47.64392354"
6871
}
6972
}

modules/nf-core/ivar/variants/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- bioconda::ivar=1.4.3
7+
- bioconda::ivar=1.4.4

modules/nf-core/ivar/variants/main.nf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ process IVAR_VARIANTS {
44

55
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/ivar:1.4.3--h43eeafb_0' :
8-
'biocontainers/ivar:1.4.3--h43eeafb_0' }"
7+
'https://depot.galaxyproject.org/singularity/ivar:1.4.4--h077b44d_0' :
8+
'biocontainers/ivar:1.4.4--h077b44d_0' }"
99

1010
input:
1111
tuple val(meta), path(bam)
@@ -44,7 +44,7 @@ process IVAR_VARIANTS {
4444
4545
cat <<-END_VERSIONS > versions.yml
4646
"${task.process}":
47-
ivar: \$(ivar version | sed 's/^.*iVar version //; s/ .*\$//')
47+
ivar: \$(ivar version | sed -n 's|iVar version \\(.*\\)|\\1|p')
4848
END_VERSIONS
4949
"""
5050

@@ -57,7 +57,7 @@ process IVAR_VARIANTS {
5757
5858
cat <<-END_VERSIONS > versions.yml
5959
"${task.process}":
60-
ivar: \$(ivar version | sed 's/^.*iVar version //; s/ .*\$//')
60+
ivar: \$(ivar version | sed -n 's|iVar version \\(.*\\)|\\1|p')
6161
END_VERSIONS
6262
"""
63-
}
63+
}

0 commit comments

Comments
 (0)