2021-09-13 15:16:23 +00:00
|
|
|
#!/usr/bin/env nextflow
|
|
|
|
|
|
|
|
nextflow.enable.dsl = 2
|
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
include { GATK4_MUTECT2 } from '../../../../modules/gatk4/mutect2/main.nf'
|
|
|
|
include { GATK4_MUTECT2 as GATK4_MUTECT2_PAIR } from '../../../../modules/gatk4/mutect2/main.nf'
|
|
|
|
include { GATK4_MUTECT2 as GATK4_MUTECT2_MITO } from '../../../../modules/gatk4/mutect2/main.nf'
|
|
|
|
include { GATK4_MUTECT2 as GATK4_MUTECT2_F1R2 } from '../../../../modules/gatk4/mutect2/main.nf'
|
2021-09-13 15:16:23 +00:00
|
|
|
|
|
|
|
workflow test_gatk4_mutect2_tumor_normal_pair {
|
2022-04-12 15:15:39 +00:00
|
|
|
input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map
|
2021-12-20 16:10:49 +00:00
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true),
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)
|
|
|
|
],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true),
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)
|
|
|
|
],
|
2022-04-12 15:15:39 +00:00
|
|
|
[]
|
2021-09-13 15:16:23 +00:00
|
|
|
]
|
2022-04-12 15:15:39 +00:00
|
|
|
|
2021-12-20 16:10:49 +00:00
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
|
|
|
germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
|
|
|
|
germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
|
|
|
|
panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
|
2021-09-13 15:16:23 +00:00
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
GATK4_MUTECT2_PAIR ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi )
|
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_gatk4_mutect2_tumor_normal_pair_f1r2 {
|
|
|
|
input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true),
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)
|
|
|
|
],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true),
|
|
|
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)
|
|
|
|
],
|
|
|
|
[]
|
|
|
|
]
|
|
|
|
|
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
|
|
|
germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
|
|
|
|
germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
|
|
|
|
panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
|
|
|
|
GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi )
|
2021-09-13 15:16:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_gatk4_mutect2_tumor_single {
|
|
|
|
input = [ [ id:'test'], // meta map
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)],
|
|
|
|
[]
|
|
|
|
]
|
2022-04-12 15:15:39 +00:00
|
|
|
|
2021-12-20 16:10:49 +00:00
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
|
|
|
germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
|
|
|
|
germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
|
|
|
|
panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
|
2021-09-13 15:16:23 +00:00
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi )
|
2021-10-29 10:27:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_gatk4_mutect2_cram_input {
|
|
|
|
input = [ [ id:'test'], // meta map
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true)],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)],
|
|
|
|
[]
|
|
|
|
]
|
2022-04-12 15:15:39 +00:00
|
|
|
|
2021-12-20 16:10:49 +00:00
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
|
|
|
germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
|
|
|
|
germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
|
|
|
|
panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
|
|
|
|
panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
|
2021-10-29 10:27:56 +00:00
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi )
|
2021-09-13 15:16:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_gatk4_mutect2_generate_pon {
|
|
|
|
input = [ [ id:'test'], // meta map
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true)],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)],
|
|
|
|
[]
|
|
|
|
]
|
2022-04-12 15:15:39 +00:00
|
|
|
|
2021-12-20 16:10:49 +00:00
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
2021-10-29 10:27:56 +00:00
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
GATK4_MUTECT2 ( input, fasta, fai, dict, [], [], [], [] )
|
2021-10-29 10:27:56 +00:00
|
|
|
}
|
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
// mitochondria mode would ideally have some mitochondria test data
|
|
|
|
// but since the mitochondria settings only increase detection sensitivity
|
|
|
|
// we can use the chr22 data as a stand in as it is already a small dataset
|
|
|
|
// the extra variants detected compared to generate_pon shows the mode is working
|
2021-10-29 10:27:56 +00:00
|
|
|
workflow test_gatk4_mutect2_mitochondria {
|
|
|
|
input = [ [ id:'test'], // meta map
|
2021-12-20 16:10:49 +00:00
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam'], checkIfExists: true)],
|
|
|
|
[ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam_bai'], checkIfExists: true)],
|
2022-04-12 15:15:39 +00:00
|
|
|
[ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]
|
2021-10-29 10:27:56 +00:00
|
|
|
]
|
2022-04-12 15:15:39 +00:00
|
|
|
|
2021-09-13 15:16:23 +00:00
|
|
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
2021-11-15 17:03:02 +00:00
|
|
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
2021-09-13 15:16:23 +00:00
|
|
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
|
|
|
|
|
2022-04-12 15:15:39 +00:00
|
|
|
GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] )
|
2021-09-13 15:16:23 +00:00
|
|
|
}
|
2022-05-02 09:59:08 +00:00
|
|
|
|
2022-05-02 12:16:07 +00:00
|
|
|
workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs {
|
|
|
|
input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map
|
2022-05-02 13:14:05 +00:00
|
|
|
[ "foo_paired.bam",
|
|
|
|
"foo_paired2.bam"
|
2022-05-02 12:16:07 +00:00
|
|
|
],
|
2022-05-02 13:14:05 +00:00
|
|
|
[ "foo_paired.bam.bai",
|
|
|
|
"foo_paired2.bam.bai"
|
2022-05-02 12:16:07 +00:00
|
|
|
],
|
2022-05-02 09:59:08 +00:00
|
|
|
[]
|
|
|
|
]
|
|
|
|
|
2022-05-02 11:30:18 +00:00
|
|
|
fasta = "genome.fasta"
|
|
|
|
fai = "genome.fasta.fai"
|
|
|
|
dict = "genome.fasta.dict"
|
|
|
|
germline_resource = "genome_gnomAD.r2.1.1.vcf.gz"
|
|
|
|
germline_resource_tbi = "genome_gnomAD.r2.1.1.vcf.gz.tbi"
|
|
|
|
panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz"
|
|
|
|
panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi"
|
2022-05-02 09:59:08 +00:00
|
|
|
|
2022-05-02 12:16:07 +00:00
|
|
|
GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi )
|
2022-05-02 09:59:08 +00:00
|
|
|
}
|