forked from nf-core/rnaseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nf-core#1232 from maxulysse/star_igenomes
Adding tests for star_align igenomes
- Loading branch information
Showing
4 changed files
with
188 additions
and
2 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
93 changes: 93 additions & 0 deletions
93
modules/local/star_genomegenerate_igenomes/tests/main.nf.test
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,93 @@ | ||
nextflow_process { | ||
|
||
name "Test Process STAR_GENOMEGENERATE_IGENOMES" | ||
script "../main.nf" | ||
process "STAR_GENOMEGENERATE_IGENOMES" | ||
|
||
tag "STAR_GENOMEGENERATE_IGENOMES" | ||
|
||
test("fasta with gtf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) | ||
input[1] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true)]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_gtf_index") }, | ||
{ assert snapshot(process.out.versions).match("fasta_gtf_versions") } | ||
) | ||
} | ||
} | ||
|
||
test("fasta with gtf - stub") { | ||
|
||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) | ||
input[1] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true)]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_gtf_stub_index") }, | ||
{ assert snapshot(process.out.versions).match("fasta_gtf_stub_versions") } | ||
) | ||
} | ||
} | ||
|
||
test("fasta no gtf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) | ||
input[1] = Channel.of([ ]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_index") }, | ||
{ assert snapshot(process.out.versions).match("fasta_versions") } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("fasta no gtf - stub") { | ||
|
||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) | ||
input[1] = Channel.of([ ]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_stub_index") }, | ||
{ assert snapshot(process.out.versions).match("fasta_stub_versions") } | ||
) | ||
} | ||
} | ||
} |
90 changes: 90 additions & 0 deletions
90
modules/local/star_genomegenerate_igenomes/tests/main.nf.test.snap
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,90 @@ | ||
{ | ||
"fasta_gtf_versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,562a70f12dd9e695449b59fbf604e98d" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:28:05.069709" | ||
}, | ||
"fasta_stub_versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,562a70f12dd9e695449b59fbf604e98d" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:31:12.153651" | ||
}, | ||
"fasta_gtf_stub_index": { | ||
"content": [ | ||
"[]" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:28:16.309869" | ||
}, | ||
"fasta_gtf_stub_versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,562a70f12dd9e695449b59fbf604e98d" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:28:16.337298" | ||
}, | ||
"fasta_index": { | ||
"content": [ | ||
"[]" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:30:56.504744" | ||
}, | ||
"fasta_versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,562a70f12dd9e695449b59fbf604e98d" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:30:56.575367" | ||
}, | ||
"fasta_gtf_index": { | ||
"content": [ | ||
"[]" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:28:05.031195" | ||
}, | ||
"fasta_stub_index": { | ||
"content": [ | ||
"[]" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.01.0" | ||
}, | ||
"timestamp": "2024-03-05T10:31:12.12097" | ||
} | ||
} |
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 @@ | ||
STAR_GENOMEGENERATE_IGENOMES: | ||
- modules/local/star_genomegenerate_igenomes/** |