-
Notifications
You must be signed in to change notification settings - Fork 695
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 quast * Update modules/nf-core/quast/tests/main.nf.test Co-authored-by: Famke Bäuerle <[email protected]> * Update modules/nf-core/quast/tests/main.nf.test Co-authored-by: Famke Bäuerle <[email protected]> * Tests for each optional input and removed pytest * Removed "ref, nogff" test --------- Co-authored-by: Famke Bäuerle <[email protected]>
- Loading branch information
1 parent
4985203
commit 8afa912
Showing
7 changed files
with
438 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
nextflow_process { | ||
|
||
name "Test Process QUAST" | ||
script "../main.nf" | ||
process "QUAST" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "quast" | ||
|
||
test("sarscov2 - ref") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id: 'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id: 'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id: 'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.results[0][1]).list().size() == 15 }, | ||
{ assert snapshot( | ||
process.out.tsv, | ||
process.out.misassemblies, | ||
process.out.unaligned, | ||
process.out.versions, | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
test("sarscov2 - noref") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id: 'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) | ||
] | ||
input[1] = [[:],[]] | ||
input[2] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.results[0][1]).list().size() == 12 }, | ||
{ assert snapshot( | ||
process.out.tsv, | ||
process.out.versions, | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
|
||
test("sarscov2 - all - stub") { | ||
|
||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id: 'test1' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id: 'test1' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id: 'test1' ], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.