Skip to content

Commit

Permalink
Adding oncotator filtering enabled in M2 WDL. (#4423)
Browse files Browse the repository at this point in the history
* Adding oncotator filtering enabled in M2 WDL.

* Fixing cromwell test oncotator version

* Changing default oncotator docker to `1.9.8.0`
  • Loading branch information
LeeTL1220 committed Mar 21, 2018
1 parent 29b6438 commit 2380b73
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
1 change: 1 addition & 0 deletions scripts/mutect2_wdl/README.md
Expand Up @@ -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

Expand Down
20 changes: 17 additions & 3 deletions scripts/mutect2_wdl/mutect2.wdl
Expand Up @@ -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
Expand Down Expand Up @@ -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.8.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
Expand Down Expand Up @@ -308,7 +313,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
}
}

Expand Down Expand Up @@ -782,6 +789,7 @@ task oncotate_m2 {
File? default_config_file
String case_id
String? control_id
String? oncotator_extra_args

# runtime
String oncotator_docker
Expand All @@ -791,6 +799,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
Expand Down Expand Up @@ -822,7 +834,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 {
Expand Down

0 comments on commit 2380b73

Please sign in to comment.