-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nf-test for ivar/consensus (#6568)
* Added nf-test for ivar/consensus * Verion bump
- Loading branch information
Showing
9 changed files
with
239 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process IVAR_CONSENSUS" | ||
script "../main.nf" | ||
process "IVAR_CONSENSUS" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "ivar" | ||
tag "ivar/consensus" | ||
|
||
test("test-ivar-consensus") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
input[2] = false | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.fasta, | ||
file(process.out.qual[0][1]).name, // empty | ||
process.out.mpileup, | ||
process.out.versions, | ||
file(process.out.versions[0]).readLines().collect { it.trim() } // Trap to catch conda version mismatches | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-ivar-consensus-mpileup") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
input[2] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.fasta, | ||
file(process.out.qual[0][1]).name, // empty | ||
file(process.out.mpileup[0][1]).name, // empty | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-ivar-consensus-mpileup-stub") { | ||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
input[2] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"test-ivar-consensus-mpileup-stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.qual.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.mpileup:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"3": [ | ||
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3" | ||
], | ||
"fasta": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"mpileup": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.mpileup:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"qual": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.qual.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-06T14:58:57.447441" | ||
}, | ||
"test-ivar-consensus-mpileup": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,9e21a64818f4302b4dece5480fa5e8b8" | ||
] | ||
], | ||
"test.qual.txt", | ||
"test.mpileup", | ||
[ | ||
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-06T14:58:52.938906" | ||
}, | ||
"test-ivar-consensus": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,9e21a64818f4302b4dece5480fa5e8b8" | ||
] | ||
], | ||
"test.qual.txt", | ||
[ | ||
|
||
], | ||
[ | ||
"versions.yml:md5,e652db2cbd4a8cd9b7482a01abe5e6b3" | ||
], | ||
[ | ||
"\"IVAR_CONSENSUS\":", | ||
"ivar: 1.4.3" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-06T14:58:48.289344" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: IVAR_CONSENSUS { | ||
ext.args2 = '-aa -A -d 0 -Q 0' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.