Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding oncotator filtering enabled in M2 WDL. #4423

Merged
merged 3 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/m2_cromwell_tests/test_m2_wdl_multi.json
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 @@ -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
}
}

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down