From 1621724214a091431470ce20bb2575c1107000dd Mon Sep 17 00:00:00 2001 From: ldgauthier Date: Fri, 9 Oct 2020 18:08:40 -0400 Subject: [PATCH] Added requester pays option to Mutect2 tasks that access bams (#6879) * Added requester pays option to Mutect2 tasks that access bams * gnomAD isn't going to be requester pays, so we don't need that arg in the CreatePanel task --- scripts/mutect2_wdl/mutect2.wdl | 32 ++++++++++++++------ scripts/mutect2_wdl/mutect2_multi_sample.wdl | 5 ++- scripts/mutect2_wdl/mutect2_pon.wdl | 7 +++-- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2.wdl b/scripts/mutect2_wdl/mutect2.wdl index 8d2914e1fb1..dbac18e3dc1 100755 --- a/scripts/mutect2_wdl/mutect2.wdl +++ b/scripts/mutect2_wdl/mutect2.wdl @@ -108,6 +108,7 @@ workflow Mutect2 { Boolean? compress_vcfs File? gga_vcf File? gga_vcf_idx + String? gcs_project_for_requester_pays # Funcotator inputs Boolean? run_funcotator @@ -271,7 +272,8 @@ workflow Mutect2 { gga_vcf_idx = gga_vcf_idx, gatk_override = gatk_override, gatk_docker = gatk_docker, - disk_space = m2_per_scatter_size + disk_space = m2_per_scatter_size, + gcs_project_for_requester_pays = gcs_project_for_requester_pays } } @@ -372,7 +374,8 @@ workflow Mutect2 { input_vcf = Filter.filtered_vcf, input_vcf_idx = Filter.filtered_vcf_idx, runtime_params = standard_runtime, - mem = filter_alignment_artifacts_mem + mem = filter_alignment_artifacts_mem, + gcs_project_for_requester_pays = gcs_project_for_requester_pays } } @@ -531,6 +534,8 @@ task M2 { File? gatk_override + String? gcs_project_for_requester_pays + # runtime String gatk_docker Int? mem @@ -579,11 +584,13 @@ task M2 { touch f1r2.tar.gz echo "" > normal_name.txt - gatk --java-options "-Xmx~{command_mem}m" GetSampleName -R ~{ref_fasta} -I ~{tumor_bam} -O tumor_name.txt -encode + gatk --java-options "-Xmx~{command_mem}m" GetSampleName -R ~{ref_fasta} -I ~{tumor_bam} -O tumor_name.txt -encode \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} tumor_command_line="-I ~{tumor_bam} -tumor `cat tumor_name.txt`" if [[ ! -z "~{normal_bam}" ]]; then - gatk --java-options "-Xmx~{command_mem}m" GetSampleName -R ~{ref_fasta} -I ~{normal_bam} -O normal_name.txt -encode + gatk --java-options "-Xmx~{command_mem}m" GetSampleName -R ~{ref_fasta} -I ~{normal_bam} -O normal_name.txt -encode \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} normal_command_line="-I ~{normal_bam} -normal `cat normal_name.txt`" fi @@ -598,7 +605,8 @@ task M2 { -O "~{output_vcf}" \ ~{true='--bam-output bamout.bam' false='' make_bamout} \ ~{true='--f1r2-tar-gz f1r2.tar.gz' false='' run_ob_filter} \ - ~{m2_extra_args} + ~{m2_extra_args} \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} m2_exit_code=$? @@ -612,12 +620,14 @@ task M2 { if [[ ! -z "~{variants_for_contamination}" ]]; then gatk --java-options "-Xmx~{command_mem}m" GetPileupSummaries -R ~{ref_fasta} -I ~{tumor_bam} ~{"--interval-set-rule INTERSECTION -L " + intervals} \ - -V ~{variants_for_contamination} -L ~{variants_for_contamination} -O tumor-pileups.table ~{getpileupsummaries_extra_args} + -V ~{variants_for_contamination} -L ~{variants_for_contamination} -O tumor-pileups.table ~{getpileupsummaries_extra_args} \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} if [[ ! -z "~{normal_bam}" ]]; then gatk --java-options "-Xmx~{command_mem}m" GetPileupSummaries -R ~{ref_fasta} -I ~{normal_bam} ~{"--interval-set-rule INTERSECTION -L " + intervals} \ - -V ~{variants_for_contamination} -L ~{variants_for_contamination} -O normal-pileups.table ~{getpileupsummaries_extra_args} + -V ~{variants_for_contamination} -L ~{variants_for_contamination} -O normal-pileups.table ~{getpileupsummaries_extra_args} \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} fi fi @@ -936,6 +946,7 @@ task FilterAlignmentArtifacts { Boolean compress File realignment_index_bundle String? realignment_extra_args + String? gcs_project_for_requester_pays Runtime runtime_params Int mem } @@ -967,7 +978,8 @@ task FilterAlignmentArtifacts { -I ~{bam} \ --bwa-mem-index-image ~{realignment_index_bundle} \ ~{realignment_extra_args} \ - -O ~{output_vcf} + -O ~{output_vcf} \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} } runtime { @@ -1014,6 +1026,7 @@ task Funcotate { File? interval_list String? extra_args + String? gcs_project_for_requester_pays # ============== Runtime runtime_params @@ -1095,7 +1108,8 @@ task Funcotate { ~{annotation_over_arg}~{default="" sep=" --annotation-override " annotation_overrides} \ ~{excluded_fields_args}~{default="" sep=" --exclude-field " funcotator_excluded_fields} \ ~{filter_funcotations_args} \ - ~{extra_args_arg} + ~{extra_args_arg} \ + ~{"--gcs-project-for-requester-pays " + gcs_project_for_requester_pays} # Make sure we have a placeholder index for MAF files so this workflow doesn't fail: if [[ "~{output_format}" == "MAF" ]] ; then touch ~{output_maf_index} diff --git a/scripts/mutect2_wdl/mutect2_multi_sample.wdl b/scripts/mutect2_wdl/mutect2_multi_sample.wdl index ea8070be657..61442704914 100644 --- a/scripts/mutect2_wdl/mutect2_multi_sample.wdl +++ b/scripts/mutect2_wdl/mutect2_multi_sample.wdl @@ -42,6 +42,8 @@ workflow Mutect2_Multi { Boolean? compress_vcfs Boolean? make_bamout + String? gcs_project_for_requester_pays + # Oncotator inputs String? sequencing_center String? sequence_source @@ -106,7 +108,8 @@ workflow Mutect2_Multi { compress_vcfs = compress_vcfs, gatk_override = gatk_override, gatk_docker = gatk_docker, - preemptible = preemptible_attempts + preemptible = preemptible_attempts, + gcs_project_for_requester_pays = gcs_project_for_requester_pays } } diff --git a/scripts/mutect2_wdl/mutect2_pon.wdl b/scripts/mutect2_wdl/mutect2_pon.wdl index 01b1ba8e6b0..0da400ca584 100644 --- a/scripts/mutect2_wdl/mutect2_pon.wdl +++ b/scripts/mutect2_wdl/mutect2_pon.wdl @@ -9,7 +9,7 @@ version 1.0 # scatter_count: number of parallel jobs when scattering over intervals # pon_name: the resulting panel of normals is {pon_name}.vcf # m2_extra_args: additional command line parameters for Mutect2. This should not involve --max-mnp-distance, -# which the wdl hard-codes to 0 because GenpmicsDBImport can't handle MNPs +# which the wdl hard-codes to 0 because GenomicsDBImport can't handle MNPs import "mutect2.wdl" as m2 workflow Mutect2_Panel { @@ -31,6 +31,8 @@ workflow Mutect2_Panel { Int? min_contig_size Int? create_panel_scatter_count + String? gcs_project_for_requester_pays + # runtime String gatk_docker File? gatk_override @@ -70,7 +72,8 @@ workflow Mutect2_Panel { gatk_override = gatk_override, gatk_docker = gatk_docker, preemptible = preemptible, - max_retries = max_retries + max_retries = max_retries, + gcs_project_for_requester_pays = gcs_project_for_requester_pays } }