-
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.
Adding meta to multivcfanalyzer, updating test to nf-test (#5773)
* Adding meta to multivcfanalyzer, updating test to nf-test * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <[email protected]> * fix meta.yml * Add sort to vcfs * Add tab to tags * add checks for files due to failing md5 sums across docker,conda,singularity --------- Co-authored-by: James A. Fellows Yates <[email protected]> Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
1 parent
73a6d7e
commit edc4ccb
Showing
9 changed files
with
410 additions
and
99 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,128 @@ | ||
nextflow_process { | ||
|
||
name "Test Process MULTIVCFANALYZER" | ||
script "../main.nf" | ||
process "MULTIVCFANALYZER" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "multivcfanalyzer" | ||
tag "gunzip" | ||
tag "gatk/unifiedgenotyper" | ||
|
||
setup { | ||
run("GATK_UNIFIEDGENOTYPER") { | ||
script "../../gatk/unifiedgenotyper/main.nf" | ||
process{ | ||
""" | ||
input[0] = Channel.of([ [ 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) | ||
], | ||
[ [ id:'test2' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_single_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] = [[],[]] | ||
input[5] = [[],[]] | ||
input[6] = [[],[]] | ||
input[7] = [[],[]] | ||
""" | ||
} | ||
} | ||
run("GUNZIP") { | ||
script "../../gunzip/main.nf" | ||
process{ | ||
""" | ||
input[0] = GATK_UNIFIEDGENOTYPER.out.vcf | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("sarscov2 - vcf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = GUNZIP.out.gunzip.collect{ meta, vcf -> vcf }.map{ vcf -> [[ id: 'testVCF'], vcf]} | ||
input[1] = [ [] , | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
input[2] = [[],[]] | ||
input[3] = [[],[]] | ||
input[4] = true | ||
input[5] = 30 | ||
input[6] = 5 | ||
input[7] = 0.8 | ||
input[8] = 0.2 | ||
input[9] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.snptable_snpeff, | ||
process.out.json, | ||
process.out.versions, | ||
file(process.out.info_txt[0][1]).readLines().any { it.contains('Run finished:') }, | ||
file(process.out.full_alignment[0][1]).readLines().any { it.contains('>') }, | ||
file(process.out.snp_alignment[0][1]).readLines().any { it.contains('>') }, | ||
file(process.out.snp_genome_alignment[0][1]).readLines().any { it.contains('>Reference') }, | ||
file(process.out.snpstatistics[0][1]).readLines().any { it.contains('SNP statistics for') }, | ||
file(process.out.snptable[0][1]).readLines().any { it.contains('Position') }, | ||
file(process.out.snptable_uncertainty[0][1]).readLines().any { it.contains('Position') }, | ||
file(process.out.structure_genotypes[0][1]).readLines().any { it.contains('-1') }, | ||
file(process.out.structure_genotypes_nomissing[0][1]).readLines().any { it.contains('-1') }).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - vcf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = GUNZIP.out.gunzip.collect{ meta, vcf -> vcf }.map{ vcf -> [[ id: 'testVCF'], vcf]} | ||
input[1] = [ [] , | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
input[2] = [[],[]] | ||
input[3] = [[],[]] | ||
input[4] = true | ||
input[5] = 30 | ||
input[6] = 5 | ||
input[7] = 0.8 | ||
input[8] = 0.2 | ||
input[9] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.