From ed2357fa0652cc243f56141aebe7e9ed46d56acc Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Fri, 18 Jun 2021 17:22:43 +0000 Subject: [PATCH 1/9] Updates to support regenotyping processes --- pipeline/call-gSV.nf | 41 +++++++++------ pipeline/config/nextflow.config | 6 +++ pipeline/inputs/call-gSV-inputs.csv | 4 +- pipeline/modules/delly.nf | 81 +++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 19 deletions(-) diff --git a/pipeline/call-gSV.nf b/pipeline/call-gSV.nf index 4f833a74..dbc1b85f 100644 --- a/pipeline/call-gSV.nf +++ b/pipeline/call-gSV.nf @@ -51,7 +51,7 @@ Starting workflow... .stripIndent() include { run_validate } from './modules/validation' -include { call_gSV_Delly; call_gCNV_Delly } from './modules/delly' +include { call_gSV_Delly; call_gCNV_Delly; regenotype_gSV_Delly; regenotype_gCNV_Delly } from './modules/delly' include { call_gSV_Manta } from './modules/manta' include { convert_BCF2VCF_BCFtools as convert_gSV_BCF2VCF_BCFtools; convert_BCF2VCF_BCFtools as convert_gCNV_BCF2VCF_BCFtools } from './modules/bcftools' include { run_vcfstats_RTGTools as run_gSV_vcfstats_RTGTools; run_vcfstats_RTGTools as run_gCNV_vcfstats_RTGTools } from './modules/rtgtools' @@ -65,7 +65,8 @@ input_bam_ch = Channel row.patient, row.sample, row.input_bam, - "${row.input_bam}.bai" + "${row.input_bam}.bai", + row.mode ) } @@ -104,21 +105,27 @@ validation_channel = Channel workflow { run_validate(validation_channel) - if (params.run_manta) { - call_gSV_Manta(input_bam_ch, params.reference_fasta, reference_fasta_index) - run_sha512sum_Manta(call_gSV_Manta.out.vcf_small_indel_sv_file.mix(call_gSV_Manta.out.vcf_diploid_sv_file, call_gSV_Manta.out.vcf_candidate_sv_file)) - } - if (params.run_delly) { - call_gSV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file) - call_gCNV_Delly(input_bam_ch, call_gSV_Delly.out.bcf_sv_file, params.reference_fasta, reference_fasta_index, params.mappability_map) - convert_gSV_BCF2VCF_BCFtools(call_gSV_Delly.out.bcf_sv_file, call_gSV_Delly.out.bam_sample_name, 'SV') - convert_gCNV_BCF2VCF_BCFtools(call_gCNV_Delly.out.bcf_cnv_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') - if (params.run_qc) { - run_gSV_vcfstats_RTGTools(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gSV_Delly.out.bam_sample_name, 'SV') - run_gSV_vcf_validator_VCFtools(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gSV_Delly.out.bam_sample_name, 'SV') - run_gCNV_vcfstats_RTGTools(convert_gCNV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') - run_gCNV_vcf_validator_VCFtools(convert_gCNV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') + if (params.run_discovery) { + if (params.run_manta) { + call_gSV_Manta(input_bam_ch, params.reference_fasta, reference_fasta_index) + run_sha512sum_Manta(call_gSV_Manta.out.vcf_small_indel_sv_file.mix(call_gSV_Manta.out.vcf_diploid_sv_file, call_gSV_Manta.out.vcf_candidate_sv_file)) + } + if (params.run_delly) { + call_gSV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file) + call_gCNV_Delly(input_bam_ch, call_gSV_Delly.out.bcf_sv_file, params.reference_fasta, reference_fasta_index, params.mappability_map) + convert_gSV_BCF2VCF_BCFtools(call_gSV_Delly.out.bcf_sv_file, call_gSV_Delly.out.bam_sample_name, 'SV') + convert_gCNV_BCF2VCF_BCFtools(call_gCNV_Delly.out.bcf_cnv_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') + if (params.run_qc) { + run_gSV_vcfstats_RTGTools(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gSV_Delly.out.bam_sample_name, 'SV') + run_gSV_vcf_validator_VCFtools(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gSV_Delly.out.bam_sample_name, 'SV') + run_gCNV_vcfstats_RTGTools(convert_gCNV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') + run_gCNV_vcf_validator_VCFtools(convert_gCNV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bam_sample_name, 'CNV') + } + run_sha512sum_Delly(call_gSV_Delly.out.bcf_sv_file.mix(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bcf_cnv_file, convert_gCNV_BCF2VCF_BCFtools.out.vcf_file)) } - run_sha512sum_Delly(call_gSV_Delly.out.bcf_sv_file.mix(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bcf_cnv_file, convert_gCNV_BCF2VCF_BCFtools.out.vcf_file)) } + if (params.run_regenotyping) { + regenotype_gSV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file, params.merged_sites) + regenotype_gCNV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file, params.merged_sites) + } } diff --git a/pipeline/config/nextflow.config b/pipeline/config/nextflow.config index f9e1cc4c..8f91ebf6 100644 --- a/pipeline/config/nextflow.config +++ b/pipeline/config/nextflow.config @@ -16,6 +16,12 @@ params { blcds_registered_dataset = false sge_scheduler = false + // The mode of the call-gSV pipeline to run. Discovery will identify SVs using Delly/Manta. Regenotyping will regenotype SVs/CNVs using Delly. Please note that setting + // `run_regenotyping` to true will supersede `run_delly` below. + run_discovery = true + run_regenotyping = false + merged_sites = '/path/to/sites.bcf' + input_csv = 'path/to/input.csv' reference_fasta = '/path/to/genome.fa' // If an index is not explicitly specified for the reference FASTA, the pipeline will assume one exists in the same directory as the reference FASTA diff --git a/pipeline/inputs/call-gSV-inputs.csv b/pipeline/inputs/call-gSV-inputs.csv index f7df4b57..c4b828e0 100644 --- a/pipeline/inputs/call-gSV-inputs.csv +++ b/pipeline/inputs/call-gSV-inputs.csv @@ -1,2 +1,2 @@ -patient,sample,input_bam -patient-name,sample-name,/path/to/sample.bam \ No newline at end of file +patient,sample,input_bam,mode +patient-name,sample-name,/path/to/sample.bam,mode \ No newline at end of file diff --git a/pipeline/modules/delly.nf b/pipeline/modules/delly.nf index 8a4627bb..1f24bbad 100644 --- a/pipeline/modules/delly.nf +++ b/pipeline/modules/delly.nf @@ -49,6 +49,47 @@ process call_gSV_Delly { """ } +process regenotype_gSV_Delly { + container docker_image_delly + + publishDir params.output_dir, + enabled: params.save_intermediate_files, + pattern: "*.bcf*", + mode: "copy", + saveAs: { "Delly-${params.delly_version}/${file(it).getName()}" } + + publishDir params.output_log_dir, + pattern: ".command.*", + mode: "copy", + saveAs: { "regenotype_gSV_Delly/${bam_sample_name}.log${file(it).getName()}" } + + input: + tuple val(bam_sample_name), path(input_bam), path(input_bam_bai) + path(reference_fasta) + path(reference_fasta_fai) + path(exclusion_file_or_mappability_map) + path(sites) + val mode + + output: + path "DELLY-${params.delly_version}_RGSV_${params.dataset_id}_${bam_sample_name}.bcf", emit: regenotyped_sv_bcf + path "DELLY-${params.delly_version}_RGSV_${params.dataset_id}_${bam_sample_name}.bcf.csi", emit: regenotyped_sv_bcf_csi + path ".command.*" + + script: + """ + set -euo pipefail + delly \ + call \ + --vcffile $sites \ + --exclude $exclusion_file_or_mappability_map \ + --genome $reference_fasta \ + --outfile "DELLY-${params.delly_version}_RGSV_${params.dataset_id}_${bam_sample_name}.bcf" \ + --map-qual ${params.map_qual} \ + "$input_bam" + """ +} + process call_gCNV_Delly { container docker_image_delly @@ -87,3 +128,43 @@ process call_gCNV_Delly { $input_bam """ } + +process regenotype_gCNV_Delly { + container docker_image_delly + + publishDir params.output_dir, + enabled: params.save_intermediate_files, + pattern: "*.bcf*", + mode: "copy", + saveAs: { "Delly-${params.delly_version}/${file(it).getName()}" } + + publishDir params.output_log_dir, + pattern: ".command.*", + mode: "copy", + saveAs: { "regenotype_gCNV_Delly/${bam_sample_name}.log${file(it).getName()}" } + + input: + tuple val(bam_sample_name), path(input_bam), path(input_bam_bai) + path(reference_fasta) + path(reference_fasta_fai) + path(exclusion_file_or_mappability_map) + path(sites) + + output: + path "DELLY-${params.delly_version}_RGCNV_${params.dataset_id}_${bam_sample_name}.bcf", emit: regenotyped_cnv_bcf + path "DELLY-${params.delly_version}_RGCNV_${params.dataset_id}_${bam_sample_name}.bcf.csi", emit: regenotyped_cnv_bcf_csi + path ".command.*" + + script: + """ + set -euo pipefail + delly \ + cnv \ + --segmentation \ + --vcffile $sites \ + --exclude $exclusion_file_or_mappability_map \ + --genome $reference_fasta \ + --outfile "DELLY-${params.delly_version}_RGCNV_${params.dataset_id}_${bam_sample_name}.bcf" \ + "$input_bam" + """ +} \ No newline at end of file From b4e4894f88defbcff4a9b6eac7e988bb959adcab Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Fri, 18 Jun 2021 22:19:55 +0000 Subject: [PATCH 2/9] Added mode input to regenotype SV/CNV and when conditional --- pipeline/modules/delly.nf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pipeline/modules/delly.nf b/pipeline/modules/delly.nf index 1f24bbad..5f0b8396 100644 --- a/pipeline/modules/delly.nf +++ b/pipeline/modules/delly.nf @@ -64,12 +64,14 @@ process regenotype_gSV_Delly { saveAs: { "regenotype_gSV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(bam_sample_name), path(input_bam), path(input_bam_bai) + tuple val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) path(exclusion_file_or_mappability_map) path(sites) - val mode + + when: + mode == 'SV' output: path "DELLY-${params.delly_version}_RGSV_${params.dataset_id}_${bam_sample_name}.bcf", emit: regenotyped_sv_bcf @@ -144,7 +146,7 @@ process regenotype_gCNV_Delly { saveAs: { "regenotype_gCNV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(bam_sample_name), path(input_bam), path(input_bam_bai) + tuple val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) path(exclusion_file_or_mappability_map) @@ -155,6 +157,9 @@ process regenotype_gCNV_Delly { path "DELLY-${params.delly_version}_RGCNV_${params.dataset_id}_${bam_sample_name}.bcf.csi", emit: regenotyped_cnv_bcf_csi path ".command.*" + when: + mode == 'CNV' + script: """ set -euo pipefail From de4a9da0d619a926df41bd0d2e691301f5cc4f84 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Fri, 18 Jun 2021 22:40:53 +0000 Subject: [PATCH 3/9] Fixed input tuples on regenotyping processes --- pipeline/modules/delly.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/modules/delly.nf b/pipeline/modules/delly.nf index 5f0b8396..aa66ac20 100644 --- a/pipeline/modules/delly.nf +++ b/pipeline/modules/delly.nf @@ -64,7 +64,7 @@ process regenotype_gSV_Delly { saveAs: { "regenotype_gSV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) path(exclusion_file_or_mappability_map) @@ -146,7 +146,7 @@ process regenotype_gCNV_Delly { saveAs: { "regenotype_gCNV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) path(exclusion_file_or_mappability_map) From 7f5e55c17c15b1abde727d0d771099cf6c7a42e6 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Mon, 21 Jun 2021 18:38:37 +0000 Subject: [PATCH 4/9] Added validation process to regenotyping --- pipeline/call-gSV.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline/call-gSV.nf b/pipeline/call-gSV.nf index dbc1b85f..94e767a4 100644 --- a/pipeline/call-gSV.nf +++ b/pipeline/call-gSV.nf @@ -104,8 +104,8 @@ validation_channel = Channel .flatten() workflow { - run_validate(validation_channel) if (params.run_discovery) { + run_validate(validation_channel) if (params.run_manta) { call_gSV_Manta(input_bam_ch, params.reference_fasta, reference_fasta_index) run_sha512sum_Manta(call_gSV_Manta.out.vcf_small_indel_sv_file.mix(call_gSV_Manta.out.vcf_diploid_sv_file, call_gSV_Manta.out.vcf_candidate_sv_file)) @@ -125,6 +125,7 @@ workflow { } } if (params.run_regenotyping) { + run_validate(validation_channel) regenotype_gSV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file, params.merged_sites) regenotype_gCNV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file, params.merged_sites) } From 3d8df14185f3d1ababaa7e970dab241a01e738cd Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Tue, 22 Jun 2021 16:10:33 +0000 Subject: [PATCH 5/9] Made indentations consistent --- pipeline/modules/delly.nf | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pipeline/modules/delly.nf b/pipeline/modules/delly.nf index aa66ac20..2bc3fe0d 100644 --- a/pipeline/modules/delly.nf +++ b/pipeline/modules/delly.nf @@ -25,17 +25,17 @@ process call_gSV_Delly { saveAs: { "call_gSV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) - path(reference_fasta) - path(reference_fasta_fai) - path(exclusion_file) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) + path(reference_fasta) + path(reference_fasta_fai) + path(exclusion_file) output: - path "DELLY-${params.delly_version}_SV_${params.dataset_id}_${bam_sample_name}.bcf", emit: bcf_sv_file - path "DELLY-${params.delly_version}_SV_${params.dataset_id}_${bam_sample_name}.bcf.csi" - path ".command.*" - val bam_sample_name, emit: bam_sample_name + path "DELLY-${params.delly_version}_SV_${params.dataset_id}_${bam_sample_name}.bcf", emit: bcf_sv_file + path "DELLY-${params.delly_version}_SV_${params.dataset_id}_${bam_sample_name}.bcf.csi" + path ".command.*" + val bam_sample_name, emit: bam_sample_name """ set -euo pipefail @@ -71,7 +71,7 @@ process regenotype_gSV_Delly { path(sites) when: - mode == 'SV' + mode == 'SV' output: path "DELLY-${params.delly_version}_RGSV_${params.dataset_id}_${bam_sample_name}.bcf", emit: regenotyped_sv_bcf @@ -107,17 +107,17 @@ process call_gCNV_Delly { saveAs: { "call_gCNV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) - path(delly_sv_file) - path(reference_fasta) - path(reference_fasta_fai) - path(mappability_file) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) + path(delly_sv_file) + path(reference_fasta) + path(reference_fasta_fai) + path(mappability_file) output: - path "DELLY-${params.delly_version}_CNV_${params.dataset_id}_${bam_sample_name}.bcf", emit: bcf_cnv_file - path "DELLY-${params.delly_version}_CNV_${params.dataset_id}_${bam_sample_name}.bcf.csi" - path ".command.*" - val bam_sample_name, emit: bam_sample_name + path "DELLY-${params.delly_version}_CNV_${params.dataset_id}_${bam_sample_name}.bcf", emit: bcf_cnv_file + path "DELLY-${params.delly_version}_CNV_${params.dataset_id}_${bam_sample_name}.bcf.csi" + path ".command.*" + val bam_sample_name, emit: bam_sample_name """ set -euo pipefail @@ -158,7 +158,7 @@ process regenotype_gCNV_Delly { path ".command.*" when: - mode == 'CNV' + mode == 'CNV' script: """ From db285c2f0bff1390005a646fcfc2accf695430c2 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Wed, 23 Jun 2021 22:19:43 +0000 Subject: [PATCH 6/9] Added configurable mode to module inputs --- pipeline/modules/validation.nf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipeline/modules/validation.nf b/pipeline/modules/validation.nf index 3319399c..b25dfe11 100644 --- a/pipeline/modules/validation.nf +++ b/pipeline/modules/validation.nf @@ -19,13 +19,14 @@ process run_validate { saveAs: { "run_validate/${file_to_validate}.log${file(it).getName()}" } input: - path(file_to_validate) + tuple val(mode), path(file_to_validate) output: + path("${file_to_validate}.temp") path ".command.*" """ set -euo pipefail - python -m validate -t file-input ${file_to_validate} + python -m validate -t ${mode} ${file_to_validate} > "${file_to_validate}.temp" """ } From ce626b746ed07776ed3b1b27566498b54025f0b3 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Wed, 23 Jun 2021 22:20:39 +0000 Subject: [PATCH 7/9] Updated discovery processes inputs to match input_bam_ch --- pipeline/modules/delly.nf | 4 ++-- pipeline/modules/manta.nf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pipeline/modules/delly.nf b/pipeline/modules/delly.nf index 2bc3fe0d..cbb24827 100644 --- a/pipeline/modules/delly.nf +++ b/pipeline/modules/delly.nf @@ -25,7 +25,7 @@ process call_gSV_Delly { saveAs: { "call_gSV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) path(exclusion_file) @@ -107,7 +107,7 @@ process call_gCNV_Delly { saveAs: { "call_gCNV_Delly/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(delly_sv_file) path(reference_fasta) path(reference_fasta_fai) diff --git a/pipeline/modules/manta.nf b/pipeline/modules/manta.nf index 3ac8f333..b654d230 100644 --- a/pipeline/modules/manta.nf +++ b/pipeline/modules/manta.nf @@ -24,7 +24,7 @@ process call_gSV_Manta { saveAs: { "call_gSV_Manta/${bam_sample_name}.log${file(it).getName()}" } input: - tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai) + tuple val(patient), val(bam_sample_name), path(input_bam), path(input_bam_bai), val(mode) path(reference_fasta) path(reference_fasta_fai) From 8491f9861c766c3dcf408455faccb71c0fb50a82 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Wed, 23 Jun 2021 22:26:20 +0000 Subject: [PATCH 8/9] Updated validation_channel to include file type parameter for validation script --- pipeline/call-gSV.nf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pipeline/call-gSV.nf b/pipeline/call-gSV.nf index 94e767a4..0ea144a8 100644 --- a/pipeline/call-gSV.nf +++ b/pipeline/call-gSV.nf @@ -92,16 +92,19 @@ else { reference_fasta_index = "${params.reference_fasta}.fai" } -// Create channel for validation validation_channel = Channel .fromPath(params.input_csv, checkIfExists:true) .splitCsv(header:true) - .map{ row -> [ - row.input_bam, - params.reference_fasta + .map{ row -> [ + 'file-type', + row.input_bam ] } - .flatten() + +Channel + .of(['file-fasta', params.reference_fasta]) + .mix(validation_channel) + .set { validation_channel } workflow { if (params.run_discovery) { From 269cd0bb333f69f4d9c4d1d44a460bb692f25c49 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Thu, 24 Jun 2021 16:05:30 +0000 Subject: [PATCH 9/9] Fixed file-input type for validation, added comment explaining how regenotyping runs --- pipeline/call-gSV.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline/call-gSV.nf b/pipeline/call-gSV.nf index 0ea144a8..f1668f51 100644 --- a/pipeline/call-gSV.nf +++ b/pipeline/call-gSV.nf @@ -96,7 +96,7 @@ validation_channel = Channel .fromPath(params.input_csv, checkIfExists:true) .splitCsv(header:true) .map{ row -> [ - 'file-type', + 'file-input', row.input_bam ] } @@ -127,6 +127,8 @@ workflow { run_sha512sum_Delly(call_gSV_Delly.out.bcf_sv_file.mix(convert_gSV_BCF2VCF_BCFtools.out.vcf_file, call_gCNV_Delly.out.bcf_cnv_file, convert_gCNV_BCF2VCF_BCFtools.out.vcf_file)) } } + // When 'run_regenotyping' is set to true, the mode specified in the input_csv will be used to determine which + // regenotyping process to run. For example, if the mode contains 'SV', regenotype_gSV_Delly will run, etc. if (params.run_regenotyping) { run_validate(validation_channel) regenotype_gSV_Delly(input_bam_ch, params.reference_fasta, reference_fasta_index, params.exclusion_file, params.merged_sites)