2022-05-04 10:51:09 -04:00
|
|
|
#!/usr/bin/env nextflow
|
|
|
|
|
|
|
|
nextflow.enable.dsl = 2
|
|
|
|
|
|
|
|
include { RTGTOOLS_VCFEVAL } from '../../../../modules/rtgtools/vcfeval/main.nf'
|
2022-05-09 03:20:42 -04:00
|
|
|
include { UNTAR } from '../../../modules/untar/main.nf'
|
2022-05-04 10:51:09 -04:00
|
|
|
|
|
|
|
workflow test_rtgtools_vcfeval {
|
|
|
|
|
|
|
|
input = [
|
2022-05-06 08:23:40 -04:00
|
|
|
[ id:'test' ], // meta map
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true),
|
2022-05-09 09:47:07 -04:00
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true),
|
2022-05-04 10:51:09 -04:00
|
|
|
]
|
|
|
|
|
2022-05-09 03:20:42 -04:00
|
|
|
truth = [
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true),
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
]
|
|
|
|
|
2022-05-10 03:35:42 -04:00
|
|
|
truth_regions = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)
|
|
|
|
|
|
|
|
evaluation_regions = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
|
2022-05-09 09:47:07 -04:00
|
|
|
|
2022-05-09 03:20:42 -04:00
|
|
|
compressed_sdf = [
|
|
|
|
[],
|
2022-05-06 08:23:40 -04:00
|
|
|
file(params.test_data['homo_sapiens']['genome']['genome_21_sdf'])
|
2022-05-09 03:20:42 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
sdf = UNTAR( compressed_sdf ).untar
|
|
|
|
.map({
|
|
|
|
meta, folder ->
|
|
|
|
folder
|
|
|
|
})
|
|
|
|
|
2022-05-06 08:23:40 -04:00
|
|
|
|
2022-05-10 03:35:42 -04:00
|
|
|
RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf )
|
2022-05-06 08:23:40 -04:00
|
|
|
}
|
|
|
|
|
2022-05-10 03:35:42 -04:00
|
|
|
workflow test_rtgtools_vcfeval_no_optional_inputs {
|
2022-05-06 08:23:40 -04:00
|
|
|
|
|
|
|
input = [
|
|
|
|
[ id:'test' ], // meta map
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true),
|
|
|
|
[],
|
|
|
|
]
|
|
|
|
|
2022-05-09 03:20:42 -04:00
|
|
|
truth = [
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true),
|
|
|
|
[]
|
|
|
|
]
|
|
|
|
|
2022-05-10 03:35:42 -04:00
|
|
|
truth_regions = []
|
|
|
|
|
|
|
|
evaluation_regions = []
|
2022-05-09 09:47:07 -04:00
|
|
|
|
2022-05-09 03:20:42 -04:00
|
|
|
compressed_sdf = [
|
|
|
|
[],
|
2022-05-06 08:23:40 -04:00
|
|
|
file(params.test_data['homo_sapiens']['genome']['genome_21_sdf'])
|
2022-05-09 03:20:42 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
sdf = UNTAR( compressed_sdf ).untar
|
|
|
|
.map({
|
|
|
|
meta, folder ->
|
|
|
|
[folder]
|
|
|
|
})
|
2022-05-06 08:23:40 -04:00
|
|
|
|
2022-05-10 03:35:42 -04:00
|
|
|
RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf )
|
2022-05-04 10:51:09 -04:00
|
|
|
}
|