Skip to content

Commit

Permalink
created variable for user to specify java heap size in picard in MT p…
Browse files Browse the repository at this point in the history
…ipeline (#8406)
  • Loading branch information
dyeramosu authored Jul 10, 2023
1 parent c068947 commit 66e35bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/mitochondria_m2_wdl/MitochondriaPipeline.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,13 @@ task RevertSam {
input {
File input_bam
String basename = basename(input_bam, ".bam")
Int machine_mem = 2000

# runtime
Int? preemptible_tries
}
Int disk_size = ceil(size(input_bam, "GB") * 2.5) + 20
Int java_mem = machine_mem - 1000

meta {
description: "Removes alignment information while retaining recalibrated base qualities and original alignment tags"
Expand All @@ -260,7 +262,7 @@ task RevertSam {
input_bam: "aligned bam"
}
command {
java -Xmx1000m -jar /usr/gitc/picard.jar \
java -Xmx~{java_mem}m -jar /usr/gitc/picard.jar \
RevertSam \
INPUT=~{input_bam} \
OUTPUT_BY_READGROUP=false \
Expand All @@ -273,7 +275,7 @@ task RevertSam {
}
runtime {
disks: "local-disk " + disk_size + " HDD"
memory: "2 GB"
memory: machine_mem + " MB"
docker: "us.gcr.io/broad-gotc-prod/genomes-in-the-cloud:2.4.2-1552931386"
preemptible: select_first([preemptible_tries, 5])
}
Expand Down

0 comments on commit 66e35bb

Please sign in to comment.