From 2afab51da693e3d792ea8382ec594fbbe1b0bdfd Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 26 Sep 2019 15:42:04 -0400 Subject: [PATCH 1/3] mutect2 WDL and pon WDL had inconsistent input names --- scripts/mutect2_wdl/mutect2_pon.wdl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2_pon.wdl b/scripts/mutect2_wdl/mutect2_pon.wdl index befd82674d7..adef9837ae9 100644 --- a/scripts/mutect2_wdl/mutect2_pon.wdl +++ b/scripts/mutect2_wdl/mutect2_pon.wdl @@ -34,7 +34,7 @@ workflow Mutect2_Panel { # runtime String gatk_docker - Int? preemptible_attempts + Int? preemptible Int? max_retries } @@ -53,7 +53,7 @@ workflow Mutect2_Panel { m2_extra_args = select_first([m2_extra_args, ""]) + "--max-mnp-distance 0", gatk_override = gatk_override, gatk_docker = gatk_docker, - preemptible_attempts = preemptible_attempts, + preemptible = preemptible, max_retries = max_retries } } @@ -81,7 +81,7 @@ workflow Mutect2_Panel { output_vcf_name = pon_name, create_pon_extra_args = create_pon_extra_args, gatk_override = gatk_override, - preemptible_attempts = preemptible_attempts, + preemptible = preemptible, max_retries = max_retries, gatk_docker = gatk_docker } @@ -95,7 +95,7 @@ workflow Mutect2_Panel { compress = select_first([compress, false]), gatk_override = gatk_override, gatk_docker = gatk_docker, - preemptible_attempts = preemptible_attempts, + preemptible = preemptible, max_retries = max_retries } @@ -123,7 +123,7 @@ task CreatePanel { # runtime String gatk_docker Int? mem - Int? preemptible_attempts + Int? preemptible Int? max_retries Int? disk_space } @@ -146,7 +146,7 @@ task CreatePanel { bootDiskSizeGb: 12 memory: machine_mem + " GB" disks: "local-disk " + select_first([disk_space, 100]) + " HDD" - preemptible: select_first([preemptible_attempts, 3]) + preemptible: select_first([preemptible, 3]) maxRetries: select_first([max_retries, 0]) } From 99f4835188cf576c12ae27a9d3eaabcffcbe2cae Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 27 Sep 2019 11:25:33 -0400 Subject: [PATCH 2/3] stuff --- scripts/mutect2_wdl/mutect2_pon.wdl | 71 +++++++++++++++++------------ 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2_pon.wdl b/scripts/mutect2_wdl/mutect2_pon.wdl index adef9837ae9..35454b0c78f 100644 --- a/scripts/mutect2_wdl/mutect2_pon.wdl +++ b/scripts/mutect2_wdl/mutect2_pon.wdl @@ -21,7 +21,8 @@ workflow Mutect2_Panel { Int scatter_count Array[String] normal_bams Array[String] normal_bais - String gnomad + File gnomad + File gnomad_idx String? m2_extra_args String? create_pon_extra_args Boolean? compress @@ -30,15 +31,30 @@ workflow Mutect2_Panel { Int? min_contig_size Int? num_contigs - File? gatk_override - # runtime String gatk_docker + File? gatk_override + String basic_bash_docker = "ubuntu:16.04" + Int? preemptible Int? max_retries + Int small_task_cpu = 2 + Int small_task_mem = 4 + Int small_task_disk = 100 + Int boot_disk_size = 12 + + # Use as a last resort to increase the disk given to every task in case of ill behaving data + Int? emergency_extra_disk } Int contig_size = select_first([min_contig_size, 1000000]) + Int preemptible_or_default = select_first([preemptible, 2]) + Int max_retries_or_default = select_first([max_retries, 2]) + + Runtime standard_runtime = {"gatk_docker": gatk_docker, "gatk_override": gatk_override, + "max_retries": max_retries_or_default, "preemptible": preemptible_or_default, "cpu": small_task_cpu, + "machine_mem": small_task_mem * 1000, "command_mem": small_task_mem * 1000 - 500, + "disk": small_task_disk, "boot_disk_size": boot_disk_size} scatter (normal_bam in zip(normal_bams, normal_bais)) { call m2.Mutect2 { @@ -65,8 +81,7 @@ workflow Mutect2_Panel { ref_dict = ref_dict, scatter_count = select_first([num_contigs, 24]), split_intervals_extra_args = "--subdivision-mode BALANCING_WITHOUT_INTERVAL_SUBDIVISION --min-contig-size " + contig_size, - gatk_override = gatk_override, - gatk_docker = gatk_docker + runtime_params = standard_runtime } scatter (subintervals in SplitIntervals.interval_files ) { @@ -78,12 +93,10 @@ workflow Mutect2_Panel { ref_fai = ref_fai, ref_dict = ref_dict, gnomad = gnomad, + gnomad_idx = gnomad_idx, output_vcf_name = pon_name, create_pon_extra_args = create_pon_extra_args, - gatk_override = gatk_override, - preemptible = preemptible, - max_retries = max_retries, - gatk_docker = gatk_docker + runtime_params = standard_runtime } } @@ -93,10 +106,7 @@ workflow Mutect2_Panel { input_vcf_indices = CreatePanel.output_vcf_index, output_name = pon_name, compress = select_first([compress, false]), - gatk_override = gatk_override, - gatk_docker = gatk_docker, - preemptible = preemptible, - max_retries = max_retries + runtime_params = standard_runtime } output { @@ -115,25 +125,29 @@ task CreatePanel { File ref_fai File ref_dict String output_vcf_name - String gnomad + File gnomad + File gnomad_idx String? create_pon_extra_args - File? gatk_override - # runtime - String gatk_docker - Int? mem - Int? preemptible - Int? max_retries - Int? disk_space + Runtime runtime_params } - Int machine_mem = select_first([mem, 8]) + Int machine_mem = 8 Int command_mem = machine_mem - 1 + parameter_meta{ + intervals: {localization_optional: true} + ref_fasta: {localization_optional: true} + ref_fai: {localization_optional: true} + ref_dict: {localization_optional: true} + gnomad: {localization_optional: true} + gnomad_idx: {localization_optional: true} + } + command { set -e - export GATK_LOCAL_JAR=~{default="/root/gatk.jar" gatk_override} + export GATK_LOCAL_JAR=~{default="/root/gatk.jar" runtime_params.gatk_override} gatk GenomicsDBImport --genomicsdb-workspace-path pon_db -R ~{ref_fasta} -V ~{sep=' -V ' input_vcfs} -L ~{intervals} @@ -142,12 +156,13 @@ task CreatePanel { } runtime { - docker: gatk_docker - bootDiskSizeGb: 12 + docker: runtime_params.gatk_docker + bootDiskSizeGb: runtime_params.boot_disk_size memory: machine_mem + " GB" - disks: "local-disk " + select_first([disk_space, 100]) + " HDD" - preemptible: select_first([preemptible, 3]) - maxRetries: select_first([max_retries, 0]) + disks: "local-disk " + runtime_params.disk + " HDD" + preemptible: runtime_params.preemptible + maxRetries: runtime_params.max_retries + cpu: runtime_params.cpu } output { From 2ab61ee907d5eabf1f4a31d8372fdef5d551bf46 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 27 Sep 2019 16:46:31 -0400 Subject: [PATCH 3/3] fsa --- scripts/mutect2_wdl/mutect2_pon.wdl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2_pon.wdl b/scripts/mutect2_wdl/mutect2_pon.wdl index 35454b0c78f..e87efd185e5 100644 --- a/scripts/mutect2_wdl/mutect2_pon.wdl +++ b/scripts/mutect2_wdl/mutect2_pon.wdl @@ -137,10 +137,6 @@ task CreatePanel { Int command_mem = machine_mem - 1 parameter_meta{ - intervals: {localization_optional: true} - ref_fasta: {localization_optional: true} - ref_fai: {localization_optional: true} - ref_dict: {localization_optional: true} gnomad: {localization_optional: true} gnomad_idx: {localization_optional: true} }