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.
added stub section and tests for bcstools_consensus
- Loading branch information
TernovojD
committed
Aug 20, 2024
1 parent
a16e02e
commit 10b48f5
Showing
4 changed files
with
198 additions
and
1 deletion.
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,90 @@ | ||
nextflow_process { | ||
|
||
name "Test Process BCFTOOLS_CONSENSUS" | ||
script "../main.nf" | ||
process "BCFTOOLS_CONSENSUS" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "bcftools" | ||
tag "bcftools/consensus" | ||
|
||
test("bcftools - test") { | ||
|
||
tag "bcftools_consensus" | ||
|
||
when { | ||
process{ | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("bcftools - test - no mask") { | ||
|
||
tag "bcftools_consensus" | ||
|
||
when { | ||
process{ | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), | ||
[] | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("bcftools - stub - test") { | ||
|
||
tag "stub" | ||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match()} | ||
) | ||
} | ||
} | ||
} |
101 changes: 101 additions & 0 deletions
101
modules/nf-core/bcftools/consensus/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,101 @@ | ||
{ | ||
"bcftools - stub - test": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,313f4a657187fdaf293c4ed69d98c112" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
], | ||
"fasta": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,313f4a657187fdaf293c4ed69d98c112" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.04.1" | ||
}, | ||
"timestamp": "2024-08-20T11:07:44.650952324" | ||
}, | ||
"bcftools - test": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,313f4a657187fdaf293c4ed69d98c112" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
], | ||
"fasta": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,313f4a657187fdaf293c4ed69d98c112" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.04.1" | ||
}, | ||
"timestamp": "2024-08-20T11:07:31.213119374" | ||
}, | ||
"bcftools - test - no mask": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,e57d3e4d113f989bc069c5fd61627091" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
], | ||
"fasta": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.fa:md5,e57d3e4d113f989bc069c5fd61627091" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,b5e1ca5013c29fa37855fe929fb21a65" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.04.1" | ||
}, | ||
"timestamp": "2024-08-20T11:07:38.238225252" | ||
} | ||
} |