forked from nf-core/modules
-
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.
add nf-test to samtools/faidx - nf-core#3936 (nf-core#5177)
* add nf-test to samtools/faidx * delete old test files * Update tags.yml * change nextflow config to get good test inputs --------- Co-authored-by: LE BARS Victor <[email protected]> Co-authored-by: Louis LE NEZET <[email protected]>
- Loading branch information
1 parent
0a7b366
commit aeb02a3
Showing
11 changed files
with
394 additions
and
112 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
name: samtools_faidx | ||
|
||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
|
||
dependencies: | ||
- bioconda::samtools=1.19.2 | ||
- bioconda::htslib=1.19.1 | ||
- bioconda::samtools=1.19.2 |
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,123 @@ | ||
nextflow_process { | ||
|
||
name "Test Process SAMTOOLS_FAIDX" | ||
script "../main.nf" | ||
process "SAMTOOLS_FAIDX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "samtools" | ||
tag "samtools/faidx" | ||
|
||
test("test_samtools_faidx") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
input[1] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test_samtools_faidx_bgzip") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta_gz'], checkIfExists: true) ] | ||
input[1] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test_samtools_faidx_fasta") { | ||
|
||
config "./nextflow.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
input[1] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) ] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test_samtools_faidx_stub_fasta") { | ||
|
||
config "./nextflow2.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
input[1] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) ] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test_samtools_faidx_stub_fai") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
input[1] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
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.
Oops, something went wrong.