From c1ef179127d787e9909919862b73e7eccd2ae1f5 Mon Sep 17 00:00:00 2001 From: lichtens Date: Fri, 16 Feb 2018 15:33:55 -0500 Subject: [PATCH 1/3] Adding oncotator filtering enabled in M2 WDL. --- scripts/mutect2_wdl/README.md | 1 + scripts/mutect2_wdl/mutect2.wdl | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/mutect2_wdl/README.md b/scripts/mutect2_wdl/README.md index 209f8ed60ef..619e3b12642 100644 --- a/scripts/mutect2_wdl/README.md +++ b/scripts/mutect2_wdl/README.md @@ -118,6 +118,7 @@ Recommended default values (where possible) are found in ``mutect2_template.json - ``Mutect2.sequencing_center`` -- Please see parameter description above in the mutect2_multi_sample. - ``Mutect2.sequence_source`` -- Please see parameter description above in the mutect2_multi_sample. - ``Mutect2.default_config_file`` -- Please see parameter description above in the mutect2_multi_sample. +- ``Mutect2.filter_oncotator_maf`` -- (optional, default true) Whether Oncotator should remove filtered variants when rendering the MAF. Ignored if `run_oncotator` is false. #### mutect2-replicate-validation diff --git a/scripts/mutect2_wdl/mutect2.wdl b/scripts/mutect2_wdl/mutect2.wdl index 76b53dcc549..e5cc011b431 100755 --- a/scripts/mutect2_wdl/mutect2.wdl +++ b/scripts/mutect2_wdl/mutect2.wdl @@ -40,6 +40,7 @@ ## ** Secondary resources ** (for optional tasks) ## onco_ds_tar_gz, default_config_file: Oncotator datasources and config file ## sequencing_center, sequence_source: metadata for Oncotator +## filter_oncotator_maf: Whether the MAF generated by oncotator should have the filtered variants removed. Default: true ## ## Outputs : ## - One VCF file and its index with primary filtering applied; secondary filtering and functional annotation if requested; a bamout.bam @@ -109,7 +110,11 @@ workflow Mutect2 { String gatk_docker String basic_bash_docker = "ubuntu:16.04" String? oncotator_docker - String oncotator_docker_or_default = select_first([oncotator_docker, "broadinstitute/oncotator:1.9.6.1"]) + String oncotator_docker_or_default = select_first([oncotator_docker, "broadinstitute/oncotator:1.9.7.0"]) + Boolean? filter_oncotator_maf + Boolean filter_oncotator_maf_or_default = select_first([filter_oncotator_maf, true]) + String? oncotator_extra_args + Int? preemptible_attempts # Use as a last resort to increase the disk given to every task in case of ill behaving data @@ -307,7 +312,9 @@ workflow Mutect2 { control_id = M2.normal_sample[0], oncotator_docker = oncotator_docker_or_default, preemptible_attempts = preemptible_attempts, - disk_space = ceil(size(oncotate_vcf_input, "GB") * large_input_to_output_multiplier) + onco_tar_size + disk_pad + disk_space = ceil(size(oncotate_vcf_input, "GB") * large_input_to_output_multiplier) + onco_tar_size + disk_pad, + filter_maf = filter_oncotator_maf_or_default, + oncotator_extra_args = oncotator_extra_args } } @@ -778,6 +785,7 @@ task oncotate_m2 { File? default_config_file String case_id String? control_id + String? oncotator_extra_args # runtime String oncotator_docker @@ -787,6 +795,10 @@ task oncotate_m2 { Int? cpu Boolean use_ssd = false + Boolean? filter_maf + Boolean is_filter_maf = select_first([filter_maf, true]) + String filter_maf_args = if (is_filter_maf) then " --collapse-filter-cols --prune-filter-cols " else "" + # Mem is in units of GB but our command and memory runtime values are in MB Int machine_mem = if defined(mem) then mem * 1000 else 3500 Int command_mem = machine_mem - 500 @@ -818,7 +830,9 @@ task oncotate_m2 { -a source:${default="Unknown" sequence_source} \ -a normal_barcode:${control_id} \ -a tumor_barcode:${case_id} \ - ${"--default_config " + default_config_file} + ${"--default_config " + default_config_file} \ + ${filter_maf_args} \ + ${oncotator_extra_args} >>> runtime { From 6d7393cb460c165a1c62465cd5d98bc359e68c6a Mon Sep 17 00:00:00 2001 From: lichtens Date: Fri, 16 Feb 2018 16:51:32 -0500 Subject: [PATCH 2/3] Fixing cromwell test oncotator version --- scripts/m2_cromwell_tests/test_m2_wdl_multi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/m2_cromwell_tests/test_m2_wdl_multi.json b/scripts/m2_cromwell_tests/test_m2_wdl_multi.json index d31427cd856..656f981c985 100644 --- a/scripts/m2_cromwell_tests/test_m2_wdl_multi.json +++ b/scripts/m2_cromwell_tests/test_m2_wdl_multi.json @@ -1,6 +1,6 @@ { "Mutect2_Multi.gatk_docker": "__GATK_DOCKER__", - "Mutect2_Multi.oncotator_docker": "broadinstitute/oncotator:1.9.6.1", + "Mutect2_Multi.oncotator_docker": "broadinstitute/oncotator:1.9.7.0", "Mutect2_Multi.intervals": "/home/travis/build/broadinstitute/gatk/scripts/m2_cromwell_tests/interval_list.interval_list", "Mutect2_Multi.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/human_g1k_v37.20.21.fasta", "Mutect2_Multi.ref_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/human_g1k_v37.20.21.fasta.fai", From 0e840f056777dd56b3ac69cb06dd0a272b058043 Mon Sep 17 00:00:00 2001 From: lichtens Date: Wed, 7 Mar 2018 13:43:27 -0500 Subject: [PATCH 3/3] Changing default oncotator docker to `1.9.8.0` --- scripts/mutect2_wdl/mutect2.wdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mutect2_wdl/mutect2.wdl b/scripts/mutect2_wdl/mutect2.wdl index e5cc011b431..08b455b6e22 100755 --- a/scripts/mutect2_wdl/mutect2.wdl +++ b/scripts/mutect2_wdl/mutect2.wdl @@ -110,7 +110,7 @@ workflow Mutect2 { String gatk_docker String basic_bash_docker = "ubuntu:16.04" String? oncotator_docker - String oncotator_docker_or_default = select_first([oncotator_docker, "broadinstitute/oncotator:1.9.7.0"]) + String oncotator_docker_or_default = select_first([oncotator_docker, "broadinstitute/oncotator:1.9.8.0"]) Boolean? filter_oncotator_maf Boolean filter_oncotator_maf_or_default = select_first([filter_oncotator_maf, true]) String? oncotator_extra_args