Skip to content

Commit

Permalink
VQSR memory changes (#39)
Browse files Browse the repository at this point in the history
Change JVM mem in SNPsVarRecal according to dynamic calculation.  Also update indels.
  • Loading branch information
ldgauthier authored and bshifaw committed Oct 31, 2019
1 parent 1954133 commit d9fea54
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions joint-discovery-gatk4.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,17 @@ task IndelsVariantRecalibrator {
String docker
Int disk_size
Int preemptible_tries
Int? machine_mem_gb
Int auto_mem = ceil(2 * size([sites_only_variant_filtered_vcf,
mills_resource_vcf,
axiomPoly_resource_vcf,
dbsnp_resource_vcf],
"GiB"))
Int machine_mem = select_first([machine_mem_gb, if auto_mem < 7 then 7 else auto_mem])
Int java_mem = machine_mem-2

command {
${gatk_path} --java-options "-Xmx24g -Xms24g" \
${gatk_path} --java-options "-Xmx${java_mem}g -Xms${java_mem}g" \
VariantRecalibrator \
-V ${sites_only_variant_filtered_vcf} \
-O ${recalibration_filename} \
Expand All @@ -569,7 +577,7 @@ task IndelsVariantRecalibrator {
}
runtime {
docker: docker
memory: "26 GB"
memory: machine_mem_gb + " GB"
cpu: "2"
disks: "local-disk " + disk_size + " HDD"
preemptible: preemptible_tries
Expand Down Expand Up @@ -660,13 +668,19 @@ task SNPsVariantRecalibrator {
String gatk_path
String docker
Int? machine_mem_gb
Int auto_mem = ceil(2*size(sites_only_variant_filtered_vcf, "GB" ))
Int auto_mem = ceil(2 * size([sites_only_variant_filtered_vcf,
hapmap_resource_vcf,
omni_resource_vcf,
one_thousand_genomes_resource_vcf,
dbsnp_resource_vcf],
"GiB"))
Int machine_mem = select_first([machine_mem_gb, if auto_mem < 7 then 7 else auto_mem])
Int java_mem = machine_mem-2
Int disk_size
Int preemptible_tries

command {
${gatk_path} --java-options "-Xmx3g -Xms3g" \
${gatk_path} --java-options "-Xmx${java_mem}g -Xms${java_mem}g" \
VariantRecalibrator \
-V ${sites_only_variant_filtered_vcf} \
-O ${recalibration_filename} \
Expand Down

0 comments on commit d9fea54

Please sign in to comment.