-
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.
add nf-test and fix stub happy/sompy (#6285)
* add nf-test and fix stub * renew snapshot * simpler match --------- Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
1 parent
88ae684
commit 5f5f9f7
Showing
9 changed files
with
270 additions
and
106 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,127 @@ | ||
nextflow_process { | ||
|
||
name "Test Process HAPPY_SOMPY" | ||
script "../main.nf" | ||
process "HAPPY_SOMPY" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "happy" | ||
tag "happy/sompy" | ||
|
||
test("homo_sapiens - vcf") { | ||
config './nextflow.config' | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), | ||
[] | ||
] | ||
input[1] = [ | ||
[ id:'test2' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id:'test3' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [[],[]] | ||
input[4] = [[],[]] | ||
input[5] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.stats, | ||
process.out.versions, | ||
file(process.out.metrics[0][1]).name, | ||
file(process.out.features[0][1]).name).match()} | ||
) | ||
} | ||
|
||
} | ||
test("homo_sapiens - vcf - bam") { | ||
config './nextflow.config' | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), | ||
[] | ||
] | ||
input[1] = [ | ||
[ id:'test2' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id:'test3' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [[],[]] | ||
input[4] = [[],[]] | ||
input[5] = [[ id:'test2' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true)] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.stats, | ||
process.out.versions, | ||
file(process.out.metrics[0][1]).name, | ||
file(process.out.features[0][1]).name).match()} | ||
) | ||
} | ||
|
||
} | ||
test("homo_sapiens - vcf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), | ||
[] | ||
] | ||
input[1] = [ | ||
[ id:'test2' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id:'test3' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [[],[]] | ||
input[4] = [[],[]] | ||
input[5] = [[],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,111 @@ | ||
{ | ||
"homo_sapiens - vcf": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.stats.csv:md5,8b35dd00bf7b5bd697a05d73fb8c0816" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" | ||
], | ||
"test.metrics.json", | ||
"test.features.csv" | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T08:56:57.589412212" | ||
}, | ||
"homo_sapiens - vcf - bam": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.stats.csv:md5,5e9aae3e92641f1934c10fe88f250e59" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" | ||
], | ||
"test.metrics.json", | ||
"test.features.csv" | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T08:57:13.752402851" | ||
}, | ||
"homo_sapiens - vcf - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.features.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.metrics.json:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"3": [ | ||
"versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" | ||
], | ||
"features": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.features.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"metrics": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.metrics.json:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"stats": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-23T14:39:09.160343644" | ||
} | ||
} |
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,5 @@ | ||
process { | ||
withName: HAPPY_SOMPY { | ||
ext.args = '--feature-table hcc.mutect.snv' | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.