-
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.
Port pytest to nftest for sentieon/haplotyper (#6069)
* Port pytest to nftest for sentieon/haplotyper * fix stub tests * ditch conda
- Loading branch information
1 parent
e5ac715
commit 409e81a
Showing
10 changed files
with
406 additions
and
167 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
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,220 @@ | ||
nextflow_process { | ||
|
||
name "Test Process SENTIEON_HAPLOTYPER" | ||
script "../main.nf" | ||
process "SENTIEON_HAPLOTYPER" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "sentieon" | ||
tag "sentieon/haplotyper" | ||
|
||
test("Sentieon Haplotyper VCF") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
[] // no intervals | ||
] | ||
input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[:],[]] | ||
input[4] = [[:],[]] | ||
input[5] = 'variant' | ||
input[6] = false | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.vcf_tbi.get(0).get(1)).name, | ||
path(process.out.vcf[0][1]).vcf.variantsMD5 | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("Sentieon Haplotyper GVCF") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
[] // no intervals | ||
] | ||
input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[:],[]] | ||
input[4] = [[:],[]] | ||
input[5] = '' | ||
input[6] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.gvcf_tbi.get(0).get(1)).name, | ||
path(process.out.gvcf[0][1]).vcf.variantsMD5 | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("Sentieon Haplotyper BOTH") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
[] // no intervals | ||
] | ||
input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[:],[]] | ||
input[4] = [[:],[]] | ||
input[5] = 'variant' | ||
input[6] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.gvcf_tbi.get(0).get(1)).name, | ||
path(process.out.gvcf[0][1]).vcf.variantsMD5, | ||
file(process.out.vcf_tbi.get(0).get(1)).name, | ||
path(process.out.vcf[0][1]).vcf.variantsMD5 | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("Sentieon Haplotyper Intervals BOTH") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) | ||
] | ||
input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[:],[]] | ||
input[4] = [[:],[]] | ||
input[5] = 'variant' | ||
input[6] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.gvcf_tbi.get(0).get(1)).name, | ||
path(process.out.gvcf[0][1]).vcf.variantsMD5, | ||
file(process.out.vcf_tbi.get(0).get(1)).name, | ||
path(process.out.vcf[0][1]).vcf.variantsMD5 | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("Sentieon Haplotyper DBSNP BOTH") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) | ||
] | ||
input[1] = [[id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists: true)] | ||
input[4] = [[id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists: true)] | ||
input[5] = 'variant' | ||
input[6] = true | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.gvcf_tbi.get(0).get(1)).name, | ||
path(process.out.gvcf[0][1]).vcf.variantsMD5, | ||
file(process.out.vcf_tbi.get(0).get(1)).name, | ||
path(process.out.vcf[0][1]).vcf.variantsMD5 | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
|
||
test("Sentieon Haplotyper - stub") { | ||
|
||
options "-stub" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
[] // no intervals | ||
] | ||
input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] | ||
input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] | ||
input[3] = [[:],[]] | ||
input[4] = [[:],[]] | ||
input[5] = '' | ||
input[6] = false | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
|
||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
|
||
} | ||
} | ||
|
||
} |
Oops, something went wrong.