-
Notifications
You must be signed in to change notification settings - Fork 752
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 files for art/illumina (#4038)
* added nf-test files - two tests (single- and paired-end) - including two nextflow.configs for `ext.args` * change tests topass on conda/mamba and singularity/docker - due to gzip the fastq files will have different md5sums with different engines * added art/illumina - should trigger the nf-test CI * extended tag to art/illumina * fixed typos -.- * fixed typo again - missing quote * renamed test.yml to tags.yml * removed art/illumina * added <tool> tag * added nf-tests for -stub-run --------- Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com>
- Loading branch information
1 parent
8663c9d
commit c578777
Showing
6 changed files
with
373 additions
and
4 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,181 @@ | ||
nextflow_process { | ||
|
||
name "Test Process ART_ILLUMINA" | ||
script "../main.nf" | ||
process "ART_ILLUMINA" | ||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "art" | ||
tag "art/illumina" | ||
|
||
test("single-end") { | ||
|
||
config "./single-end.nextflow.config" | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
[ | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
] | ||
input[1] = 'HS25' | ||
input[2] = '15' | ||
input[3] = '150' | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert path(process.out.aln.get(0).get(1)).md5 == "7aa88720911ca1a862e4a24d57435e3c"}, | ||
{ assert path(process.out.fastq.get(0).get(1)).linesGzip.size() == 11880 }, | ||
{ | ||
def read_name = path(process.out.fastq.get(0).get(1)).linesGzip[0] | ||
assert read_name.equals("@MT192765.1-2970") | ||
}, | ||
{ | ||
def read = path(process.out.fastq.get(0).get(1)).linesGzip[1] | ||
assert read.equals("GAAAAGAGCTATGAATTGCAGACACCTTTTGAAATTAAATTGGCAAAGAAATTTGACACCTTCTATGGGGAATGTCCAAATTTTGTATTTCCCTTAAATTCCATAATCAAGACTATTCAACCAAGGGTTGAAAAGAAAAAGCTTGATGGC") | ||
}, | ||
{ | ||
def read_qc = path(process.out.fastq.get(0).get(1)).linesGzip[3] | ||
assert read_qc.equals("C1CGGGCGG=GGGJGJG=JJCJJJCJGJJJJGJJJ1JJJGJJGGJGJJGGGJJGJJJCJGGGJ(=G1GGG(CCCGGGCGCGGGCCGCCG8GGGGGGGGGGCC(CGG1GGGG1GGCGCGGCGGGCGCGGGCGGGGCGCCGGGGGCG8GGGG") | ||
}, | ||
{ assert snapshot(process.out.versions).match("versions") } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("single-end-stub") { | ||
|
||
options "-stub-run" | ||
config "./single-end.nextflow.config" | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
[ | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
] | ||
input[1] = 'HS25' | ||
input[2] = '15' | ||
input[3] = '150' | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired-end") { | ||
|
||
config "./paired-end.nextflow.config" | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
[ | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
] | ||
input[1] = 'HS25' | ||
input[2] = '15' | ||
input[3] = '150' | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert path(process.out.fastq.get(0).get(1).get(0)).linesGzip.size() == 5940 }, | ||
{ | ||
def read_name = path(process.out.fastq.get(0).get(1).get(0)).linesGzip[0] | ||
assert read_name.equals("@MT192765.1-2970/1") | ||
}, | ||
{ | ||
def read = path(process.out.fastq.get(0).get(1).get(0)).linesGzip[1] | ||
assert read.equals("GTTGCGACTACGTGATGAGGAACGAGAAGCGGCTTGACTGCCGCCTCTGCTCCCTTCTGCGTAGAAGCCTTTTGGCAATGTTGTTCCTTGAGGAAGTTGTAGCACGATTGCAGCATTGTTAGCAGGATTGCGGGTGCCAATGTGATCTTT") | ||
}, | ||
{ | ||
def read_qc = path(process.out.fastq.get(0).get(1).get(0)).linesGzip[3] | ||
assert read_qc.equals("CCCGGGGGGGGGGGCJCJJJJJ1JJJGJJ(JJJGGGJJJJGGJGJJGJJJCCGCJCJC=GCGGG8GJGGGCGG=1G1CJGG=GGCGGCGGGGGCCGG=8GJCCGCCGCGGGGGGGC=GGG=CCGCGGCGGGCC=GGGGGGCGGCCCGCGG") | ||
}, | ||
{ assert path(process.out.fastq.get(0).get(1).get(1)).linesGzip.size() == 5940 }, | ||
{ | ||
def read_name = path(process.out.fastq.get(0).get(1).get(1)).linesGzip[0] | ||
assert read_name.equals("@MT192765.1-2970/2") | ||
}, | ||
{ | ||
def read = path(process.out.fastq.get(0).get(1).get(1)).linesGzip[1] | ||
assert read.equals("GAGCTACCAGACGAATTCGTGGTGGTGACGGTAAAATGAAAGATCTCAGTCCAAGATGGTATTTCTACTACCTAGGAACTGGGCCAGAAGCTGGACTTCCCTATGGTGCTAACAAAGACGGCATCATATGGGTTGCAACTGAGGGAGCCT") | ||
}, | ||
{ | ||
def read_qc = path(process.out.fastq.get(0).get(1).get(1)).linesGzip[3] | ||
assert read_qc.equals("1CCGGGGGGGCGGGJJJJJGJG1GJGJ=JGJJCJJJCJJJGJ1GJGJGGJJC8JGG=JGGCGCCGCGGCCCGJCGGGGCJC==CGG88CGGGCGGGCCCGGC8JJJJCGGCGGCCGGGG=CGGGGCCGGCCCGCGCCCCG8GGGG=GGGC") | ||
}, | ||
{ assert snapshot(process.out.versions).match("versions") } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired-end-stub") { | ||
|
||
options "-stub-run" | ||
config "./paired-end.nextflow.config" | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
[ | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
] | ||
input[1] = 'HS25' | ||
input[2] = '15' | ||
input[3] = '150' | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
modules/nf-core/art/illumina/tests/paired-end.nextflow.config
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 { | ||
|
||
ext.args = '-p -m 250 -s 50 -rs 42' | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
modules/nf-core/art/illumina/tests/single-end.nextflow.config
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 { | ||
|
||
ext.args = '-rs 42' | ||
|
||
} |
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,2 @@ | ||
art/illumina: | ||
- modules/nf-core/art/illumina/** |
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