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.
Update/gatk4spark applybqsr nftest (nf-core#4613)
* remove pytests * removed TODO statements * add stub block * add nf-tests * remove pytests
- Loading branch information
1 parent
6c8f32d
commit 9f8cc1a
Showing
15 changed files
with
617 additions
and
199 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
166 changes: 166 additions & 0 deletions
166
modules/nf-core/gatk4/baserecalibrator/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,166 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GATK4_BASERECALIBRATOR" | ||
script "../main.nf" | ||
process "GATK4_BASERECALIBRATOR" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gatk4" | ||
tag "gatk4/baserecalibrator" | ||
|
||
test("sarscov2 - bam") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), | ||
[] | ||
] | ||
input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) | ||
input[3] = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) | ||
input[4] = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) | ||
input[5] = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - bam - intervals") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) | ||
input[3] = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) | ||
input[4] = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) | ||
input[5] = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - bam - multiple sites") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), | ||
[] | ||
] | ||
input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) | ||
input[3] = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) | ||
input[4] = [ | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) | ||
] | ||
input[5] = [ | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - bam - stub") { | ||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
[], | ||
[], | ||
[] | ||
] | ||
input[1] = [] | ||
input[2] = [] | ||
input[3] = [] | ||
input[4] = [] | ||
input[5] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo_sapiens - cram ") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), | ||
[] | ||
] | ||
input[1] = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) | ||
input[3] = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) | ||
input[4] = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) | ||
input[5] = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
147 changes: 147 additions & 0 deletions
147
modules/nf-core/gatk4/baserecalibrator/tests/main.nf.test.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
gatk4/baserecalibrator: | ||
- "modules/nf-core/gatk4/baserecalibrator/**" |
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
Oops, something went wrong.