From d0fa5d55ea19592263e5466e57ecd2f9d1749e0c Mon Sep 17 00:00:00 2001
From: pjvan_thof <pjrvanthof@gmail.com>
Date: Thu, 14 Jun 2018 12:06:03 +0200
Subject: [PATCH] fixing gatk mem option

---
 gatk.wdl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gatk.wdl b/gatk.wdl
index 78c53b8..d54277b 100644
--- a/gatk.wdl
+++ b/gatk.wdl
@@ -19,7 +19,7 @@ task ApplyBQSR {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -74,7 +74,7 @@ task BaseRecalibrator {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -120,7 +120,7 @@ task CombineGVCFs {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -164,7 +164,7 @@ task GatherBqsrReports {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -209,7 +209,7 @@ task GenotypeGVCFs {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -261,7 +261,7 @@ task HaplotypeCallerGvcf {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
@@ -306,7 +306,7 @@ task SplitNCigarReads {
 
     String toolCommand = if defined(gatkJar)
     then "java -Xmx" + mem + "G -jar " + gatkJar
-    else "gatk -Xmx" + mem + "G"
+    else "gatk --java-options -Xmx" + mem + "G"
 
     command {
         set -e -o pipefail
-- 
GitLab