diff --git a/scripts/cnv_wdl/cnv_common_tasks.wdl b/scripts/cnv_wdl/cnv_common_tasks.wdl index 275b47e4d63..b7594bfc411 100755 --- a/scripts/cnv_wdl/cnv_common_tasks.wdl +++ b/scripts/cnv_wdl/cnv_common_tasks.wdl @@ -8,11 +8,14 @@ task PreprocessIntervals { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb + Int machine_mem_mb = select_first([mem_gb, 2]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 + # Determine output filename String filename = select_first([intervals, "wgs"]) String base_filename = basename(filename, ".interval_list") @@ -21,7 +24,7 @@ task PreprocessIntervals { set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${default="2" mem}g" PreprocessIntervals \ + gatk --java-options "-Xmx${command_mem_mb}m" PreprocessIntervals \ ${"-L " + intervals} \ --sequence-dictionary ${ref_fasta_dict} \ --reference ${ref_fasta} \ @@ -33,7 +36,7 @@ task PreprocessIntervals { runtime { docker: "${gatk_docker}" - memory: select_first([mem, 2]) + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 40]) + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -51,16 +54,19 @@ task AnnotateIntervals { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb + Int machine_mem_mb = select_first([mem_gb, 2]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 + command <<< set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${default="4" mem}g" AnnotateIntervals \ + gatk --java-options "-Xmx${command_mem_mb}m" AnnotateIntervals \ -L ${intervals} \ --reference ${ref_fasta} \ --interval-merging-rule OVERLAPPING_ONLY \ @@ -69,7 +75,7 @@ task AnnotateIntervals { runtime { docker: "${gatk_docker}" - memory: select_first([mem, 5]) + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, ceil(size(ref_fasta, "GB")) + 50]) + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -87,11 +93,14 @@ task CollectCounts { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 + # Sample name is derived from the bam filename String base_filename = basename(bam, ".bam") String counts_filename = if !defined(format) then "${base_filename}.counts.hdf5" else "${base_filename}.counts.tsv" @@ -100,7 +109,7 @@ task CollectCounts { set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${default="8" mem}g" CollectFragmentCounts \ + gatk --java-options "-Xmx${command_mem_mb}m" CollectFragmentCounts \ --input ${bam} \ -L ${intervals} \ --format ${default="HDF5" format} \ @@ -110,7 +119,7 @@ task CollectCounts { runtime { docker: "${gatk_docker}" - memory: select_first([mem, 8]) + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, ceil(size(bam, "GB")) + 50]) + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -132,14 +141,13 @@ task CollectAllelicCounts { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb - # 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 13000 - Int command_mem = machine_mem - 1000 + Int machine_mem_mb = select_first([mem_gb, 13]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 # Sample name is derived from the bam filename String base_filename = basename(bam, ".bam") @@ -150,7 +158,7 @@ task CollectAllelicCounts { set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" CollectAllelicCounts \ + gatk --java-options "-Xmx${command_mem_mb}m" CollectAllelicCounts \ -L ${common_sites} \ --input ${bam} \ --reference ${ref_fasta} \ @@ -160,7 +168,7 @@ task CollectAllelicCounts { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, ceil(size(bam, "GB")) + 50]) + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -176,11 +184,13 @@ task ScatterIntervals { Int num_intervals_per_scatter # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb + Int machine_mem_mb = select_first([mem_gb, 2]) * 1000 + String base_filename = basename(interval_list, ".interval_list") command <<< @@ -194,7 +204,7 @@ task ScatterIntervals { runtime { docker: "${gatk_docker}" - memory: select_first([mem, 2]) + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 40]) + " HDD" preemptible: select_first([preemptible_attempts, 5]) } diff --git a/scripts/cnv_wdl/germline/cnv_germline_case_workflow.wdl b/scripts/cnv_wdl/germline/cnv_germline_case_workflow.wdl index 82557aeabf9..661cd0ba874 100644 --- a/scripts/cnv_wdl/germline/cnv_germline_case_workflow.wdl +++ b/scripts/cnv_wdl/germline/cnv_germline_case_workflow.wdl @@ -38,8 +38,8 @@ workflow CNVGermlineCaseWorkflow { #### optional basic arguments #### ################################## File? gatk4_jar_override - Int? mem_for_determine_germline_contig_ploidy - Int? mem_for_germline_cnv_caller + Int? mem_gb_for_determine_germline_contig_ploidy + Int? mem_gb_for_germline_cnv_caller Int? cpu_for_determine_germline_contig_ploidy Int? cpu_for_germline_cnv_caller Int? preemptible_attempts @@ -116,7 +116,7 @@ workflow CNVGermlineCaseWorkflow { contig_ploidy_model_tar = contig_ploidy_model_tar, gatk4_jar_override = gatk4_jar_override, gatk_docker = gatk_docker, - mem = mem_for_determine_germline_contig_ploidy, + mem_gb = mem_for_determine_germline_contig_ploidy, cpu = cpu_for_determine_germline_contig_ploidy, mapping_error_rate = ploidy_mapping_error_rate, sample_psi_scale = ploidy_sample_psi_scale, @@ -141,7 +141,7 @@ workflow CNVGermlineCaseWorkflow { intervals = ScatterIntervals.scattered_interval_lists[scatter_index], gatk4_jar_override = gatk4_jar_override, gatk_docker = gatk_docker, - mem = mem_for_germline_cnv_caller, + mem_gb = mem_for_germline_cnv_caller, cpu = cpu_for_germline_cnv_caller, p_alt = gcnv_p_alt, cnv_coherence_length = gcnv_cnv_coherence_length, @@ -190,7 +190,7 @@ task DetermineGermlineContigPloidyCaseMode { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb Int? cpu String gatk_docker Int? preemptible_attempts @@ -202,8 +202,8 @@ task DetermineGermlineContigPloidyCaseMode { # We do not expose Hybrid ADVI parameters -- the default values are decent - Int machine_mem = if defined(mem) then select_first([mem]) else 8 - Float command_mem = machine_mem - 0.5 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -218,7 +218,7 @@ task DetermineGermlineContigPloidyCaseMode { mkdir input-contig-ploidy-model tar xzf ${contig_ploidy_model_tar} -C input-contig-ploidy-model - gatk --java-options "-Xmx${machine_mem}g" DetermineGermlineContigPloidy \ + gatk --java-options "-Xmx${command_mem_mb}m" DetermineGermlineContigPloidy \ --input ${sep=" --input " read_count_files} \ --model input-contig-ploidy-model \ --output ${output_dir_} \ @@ -232,7 +232,7 @@ task DetermineGermlineContigPloidyCaseMode { runtime { docker: "${gatk_docker}" - memory: command_mem + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 150]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) cpu: select_first([cpu, 8]) @@ -254,7 +254,7 @@ task GermlineCNVCallerCaseMode { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb Int? cpu String gatk_docker Int? preemptible_attempts @@ -293,8 +293,8 @@ task GermlineCNVCallerCaseMode { Float? caller_admixing_rate Boolean? disable_annealing - Int machine_mem = if defined(mem) then select_first([mem]) else 8 - Float command_mem = machine_mem - 0.5 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -312,7 +312,7 @@ task GermlineCNVCallerCaseMode { mkdir gcnv-model tar xzf ${gcnv_model_tar} -C gcnv-model - gatk --java-options "-Xmx${machine_mem}g" GermlineCNVCaller \ + gatk --java-options "-Xmx${command_mem_mb}m" GermlineCNVCaller \ --run-mode CASE \ --input ${sep=" --input " read_count_files} \ --contig-ploidy-calls contig-ploidy-calls-dir \ @@ -353,7 +353,7 @@ task GermlineCNVCallerCaseMode { runtime { docker: "${gatk_docker}" - memory: command_mem + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 150]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) cpu: select_first([cpu, 8]) diff --git a/scripts/cnv_wdl/germline/cnv_germline_cohort_workflow.wdl b/scripts/cnv_wdl/germline/cnv_germline_cohort_workflow.wdl index 11365d819cf..858c698bbf0 100644 --- a/scripts/cnv_wdl/germline/cnv_germline_cohort_workflow.wdl +++ b/scripts/cnv_wdl/germline/cnv_germline_cohort_workflow.wdl @@ -36,8 +36,8 @@ workflow CNVGermlineCohortWorkflow { #### optional basic arguments #### ################################## File? gatk4_jar_override - Int? mem_for_determine_germline_contig_ploidy - Int? mem_for_germline_cnv_caller + Int? mem_gb_for_determine_germline_contig_ploidy + Int? mem_gb_for_germline_cnv_caller Int? cpu_for_determine_germline_contig_ploidy Int? cpu_for_germline_cnv_caller Int? preemptible_attempts @@ -147,7 +147,7 @@ workflow CNVGermlineCohortWorkflow { contig_ploidy_priors = contig_ploidy_priors, gatk4_jar_override = gatk4_jar_override, gatk_docker = gatk_docker, - mem = mem_for_determine_germline_contig_ploidy, + mem_gb = mem_for_determine_germline_contig_ploidy, cpu = cpu_for_determine_germline_contig_ploidy, mean_bias_standard_deviation = ploidy_mean_bias_standard_deviation, mapping_error_rate = ploidy_mapping_error_rate, @@ -175,7 +175,7 @@ workflow CNVGermlineCohortWorkflow { annotated_intervals = AnnotateIntervals.annotated_intervals, gatk4_jar_override = gatk4_jar_override, gatk_docker = gatk_docker, - mem = mem_for_germline_cnv_caller, + mem_gb = mem_for_germline_cnv_caller, cpu = cpu_for_germline_cnv_caller, p_alt = gcnv_p_alt, p_active = gcnv_p_active, @@ -234,7 +234,7 @@ task DetermineGermlineContigPloidyCohortMode { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb Int? cpu String gatk_docker Int? preemptible_attempts @@ -248,8 +248,8 @@ task DetermineGermlineContigPloidyCohortMode { # We do not expose Hybrid ADVI parameters -- the default values are decent - Int machine_mem = if defined(mem) then select_first([mem]) else 8 - Float command_mem = machine_mem - 0.5 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -261,7 +261,7 @@ task DetermineGermlineContigPloidyCohortMode { export MKL_NUM_THREADS=${default=8 cpu} export OMP_NUM_THREADS=${default=8 cpu} - gatk --java-options "-Xmx${machine_mem}g" DetermineGermlineContigPloidy \ + gatk --java-options "-Xmx${command_mem_mb}m" DetermineGermlineContigPloidy \ --input ${sep=" --input " read_count_files} \ --contig-ploidy-priors ${contig_ploidy_priors} \ --output ${output_dir_} \ @@ -278,7 +278,7 @@ task DetermineGermlineContigPloidyCohortMode { runtime { docker: "${gatk_docker}" - memory: command_mem + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 150]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) cpu: select_first([cpu, 8]) @@ -301,7 +301,7 @@ task GermlineCNVCallerCohortMode { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb Int? cpu String gatk_docker Int? preemptible_attempts @@ -349,8 +349,8 @@ task GermlineCNVCallerCohortMode { Float? caller_admixing_rate Boolean? disable_annealing - Int machine_mem = if defined(mem) then select_first([mem]) else 8 - Float command_mem = machine_mem - 0.5 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -365,7 +365,7 @@ task GermlineCNVCallerCohortMode { mkdir contig-ploidy-calls-dir tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls-dir - gatk --java-options "-Xmx${machine_mem}g" GermlineCNVCaller \ + gatk --java-options "-Xmx${command_mem_mb}m" GermlineCNVCaller \ --run-mode COHORT \ -L ${intervals} \ --input ${sep=" --input " read_count_files} \ @@ -418,7 +418,7 @@ task GermlineCNVCallerCohortMode { runtime { docker: "${gatk_docker}" - memory: command_mem + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 150]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) cpu: select_first([cpu, 8]) diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_oncotator_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_oncotator_workflow.wdl index edb2a58c91b..17a41a5c261 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_oncotator_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_oncotator_workflow.wdl @@ -1,13 +1,13 @@ workflow CNVOncotatorWorkflow { File called_file - Int? mem + Int? mem_gb String? oncotator_docker String? additional_args call OncotateSegments { input: called_file = called_file, - mem = mem, + mem_gb = mem_gb, oncotator_docker = oncotator_docker, additional_args = additional_args } @@ -24,11 +24,13 @@ task OncotateSegments { String basename_called_file = basename(called_file) # Runtime parameters - Int? mem + Int? mem_gb String? oncotator_docker Int? preemptible_attempts Int? disk_space_gb + Int machine_mem_mb = select_first([mem_gb, 3]) * 1000 + command <<< set -e @@ -50,7 +52,7 @@ task OncotateSegments { runtime { docker: select_first([oncotator_docker, "broadinstitute/oncotator:1.9.5.0-eval-gatk-protected"]) - memory: select_first([mem, 3]) + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 50]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) bootDiskSizeGb: 50 diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl index bf08d7e71d7..49013bf9562 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl @@ -304,20 +304,19 @@ task DenoiseReadCounts { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int disk_space_gb - # 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 13000 - Int command_mem = machine_mem - 1000 + Int machine_mem_mb = select_first([mem_gb, 13]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 command <<< set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" DenoiseReadCounts \ + gatk --java-options "-Xmx${command_mem_mb}m" DenoiseReadCounts \ --input ${read_counts} \ --count-panel-of-normals ${read_count_pon} \ ${"--number-of-eigensamples " + number_of_eigensamples} \ @@ -327,7 +326,7 @@ task DenoiseReadCounts { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + disk_space_gb + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -366,15 +365,14 @@ task ModelSegments { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int disk_space_gb - # 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 13000 + Int machine_mem_mb = select_first([mem_gb, 13]) * 1000 # ModelSegments seems to need at least 3GB of overhead to run - Int command_mem = machine_mem - 3000 + Int command_mem_mb = machine_mem_mb - 3000 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -384,7 +382,7 @@ task ModelSegments { mkdir ${output_dir_} export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" ModelSegments \ + gatk --java-options "-Xmx${command_mem_mb}m" ModelSegments \ --denoised-copy-ratios ${denoised_copy_ratios} \ --allelic-counts ${allelic_counts} \ ${"--normal-allelic-counts " + normal_allelic_counts} \ @@ -417,7 +415,7 @@ task ModelSegments { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + disk_space_gb + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -444,20 +442,19 @@ task CallCopyRatioSegments { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int disk_space_gb - # 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 7000 - Int command_mem = machine_mem - 1000 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 command <<< set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" CallCopyRatioSegments \ + gatk --java-options "-Xmx${command_mem_mb}m" CallCopyRatioSegments \ --input ${copy_ratio_segments} \ --neutral-segment-copy-ratio-threshold ${default="0.1" neutral_segment_copy_ratio_threshold} \ --outlier-neutral-segment-copy-ratio-z-score-threshold ${default="2.0" outlier_neutral_segment_copy_ratio_z_score_threshold} \ @@ -467,7 +464,7 @@ task CallCopyRatioSegments { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + disk_space_gb + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -487,14 +484,13 @@ task PlotDenoisedCopyRatios { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int disk_space_gb - # 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 7000 - Int command_mem = machine_mem - 1000 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -504,7 +500,7 @@ task PlotDenoisedCopyRatios { mkdir ${output_dir_} export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" PlotDenoisedCopyRatios \ + gatk --java-options "-Xmx${command_mem_mb}m" PlotDenoisedCopyRatios \ --standardized-copy-ratios ${standardized_copy_ratios} \ --denoised-copy-ratios ${denoised_copy_ratios} \ --sequence-dictionary ${ref_fasta_dict} \ @@ -515,7 +511,7 @@ task PlotDenoisedCopyRatios { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + disk_space_gb + " HDD" preemptible: select_first([preemptible_attempts, 5]) } @@ -541,14 +537,13 @@ task PlotModeledSegments { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int disk_space_gb - # 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 7000 - Int command_mem = machine_mem - 1000 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 1000 # If optional output_dir not specified, use "out" String output_dir_ = select_first([output_dir, "out"]) @@ -558,7 +553,7 @@ task PlotModeledSegments { mkdir ${output_dir_} export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${command_mem}m" PlotModeledSegments \ + gatk --java-options "-Xmx${command_mem_mb}m" PlotModeledSegments \ --denoised-copy-ratios ${denoised_copy_ratios} \ --allelic-counts ${het_allelic_counts} \ --segments ${modeled_segments} \ @@ -570,7 +565,7 @@ task PlotModeledSegments { runtime { docker: "${gatk_docker}" - memory: machine_mem + " MB" + memory: machine_mem_mb + " MB" disks: "local-disk " + disk_space_gb + " HDD" preemptible: select_first([preemptible_attempts, 5]) } diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl index da58cdc645b..0ab726a6978 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl @@ -30,7 +30,7 @@ workflow CNVSomaticPanelWorkflow { File ref_fasta String gatk_docker File? gatk4_jar_override - Int? mem_for_create_read_count_pon + Int? mem_gb_for_create_read_count_pon # If true, AnnotateIntervals will be run to create GC annotations and explicit GC correction # will be performed by the PoN generated by CreateReadCountPanelOfNormals before PCA is performed on subsequent cases @@ -78,7 +78,7 @@ workflow CNVSomaticPanelWorkflow { annotated_intervals = AnnotateIntervals.annotated_intervals, gatk4_jar_override = gatk4_jar_override, gatk_docker = gatk_docker, - mem = mem_for_create_read_count_pon + mem_gb = mem_for_create_read_count_pon } output { @@ -100,19 +100,19 @@ task CreateReadCountPanelOfNormals { File? gatk4_jar_override # Runtime parameters - Int? mem + Int? mem_gb String gatk_docker Int? preemptible_attempts Int? disk_space_gb - Int machine_mem = if defined(mem) then select_first([mem]) else 8 - Float command_mem = machine_mem - 0.5 + Int machine_mem_mb = select_first([mem_gb, 7]) * 1000 + Int command_mem_mb = machine_mem_mb - 500 command <<< set -e export GATK_LOCAL_JAR=${default="/root/gatk.jar" gatk4_jar_override} - gatk --java-options "-Xmx${machine_mem}g" CreateReadCountPanelOfNormals \ + gatk --java-options "-Xmx${command_mem_mb}m" CreateReadCountPanelOfNormals \ --input ${sep=" --input " read_count_files} \ --minimum-interval-median-percentile ${default="10.0" minimum_interval_median_percentile} \ --maximum-zeros-in-sample-percentage ${default="5.0" maximum_zeros_in_sample_percentage} \ @@ -127,7 +127,7 @@ task CreateReadCountPanelOfNormals { runtime { docker: "${gatk_docker}" - memory: command_mem + " GB" + memory: machine_mem_mb + " MB" disks: "local-disk " + select_first([disk_space_gb, 150]) + " HDD" preemptible: select_first([preemptible_attempts, 2]) }