From 986ed55b51f5bf8c1bbf7226eb7350bcd64dd478 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Mon, 8 Mar 2021 15:59:33 +0100
Subject: [PATCH] gatk4: add G unit to xmx params

---
 src/nf_modules/gatk4/main.nf | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/nf_modules/gatk4/main.nf b/src/nf_modules/gatk4/main.nf
index c4f84bc8..4e77d5ca 100644
--- a/src/nf_modules/gatk4/main.nf
+++ b/src/nf_modules/gatk4/main.nf
@@ -15,7 +15,7 @@ process variant_calling {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T HaplotypeCaller \
+gatk --java-options "-Xmx${xmx_memory}G" -T HaplotypeCaller \
   -nct ${task.cpus} \
   -R ${fasta} \
   -I ${bam} \
@@ -36,7 +36,7 @@ process filter_snp {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T SelectVariants \
+gatk --java-options "-Xmx${xmx_memory}G" -T SelectVariants \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -58,7 +58,7 @@ process filter_indels {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}"-T SelectVariants \
+gatk --java-options "-Xmx${xmx_memory}G"-T SelectVariants \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -82,7 +82,7 @@ process high_confidence_snp {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}"-T VariantFiltration \
+gatk --java-options "-Xmx${xmx_memory}G"-T VariantFiltration \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -107,7 +107,7 @@ process high_confidence_indels {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T VariantFiltration \
+gatk --java-options "-Xmx${xmx_memory}G" -T VariantFiltration \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -130,7 +130,7 @@ process recalibrate_snp_table {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T BaseRecalibrator \
+gatk --java-options "-Xmx${xmx_memory}G" -T BaseRecalibrator \
   -nct ${task.cpus} \
   -R ${fasta} \
   -I ${bam} \
@@ -154,7 +154,7 @@ process recalibrate_snp {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T PrintReads \
+gatk --java-options "-Xmx${xmx_memory}G" -T PrintReads \
   --use_jdk_deflater \
   --use_jdk_inflater \
   -nct ${task.cpus} \
@@ -178,7 +178,7 @@ process haplotype_caller {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T HaplotypeCaller \
+gatk --java-options "-Xmx${xmx_memory}G" -T HaplotypeCaller \
   -nct ${task.cpus} \
   -R ${fasta} \
   -I ${bam} \
@@ -201,7 +201,7 @@ process gvcf_genotyping {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T GenotypeGVCFs \
+gatk --java-options "-Xmx${xmx_memory}G" -T GenotypeGVCFs \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${gvcf} \
@@ -222,7 +222,7 @@ process select_variants_snp {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}G" -T SelectVariants \
+gatk --java-options "-Xmx${xmx_memory}GG" -T SelectVariants \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -244,7 +244,7 @@ process select_variants_indels {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T SelectVariants \
+gatk --java-options "-Xmx${xmx_memory}G" -T SelectVariants \
   -nct ${task.cpus} \
   -R ${fasta} \
   -V ${vcf} \
@@ -267,7 +267,7 @@ process personalized_genome {
   script:
   xmx_memory = task.memory - ~/\s*GB/
 """
-gatk --java-options "-Xmx${xmx_memory}" -T FastaAlternateReferenceMaker\
+gatk --java-options "-Xmx${xmx_memory}G" -T FastaAlternateReferenceMaker\
   -R ${reference} \
   -V ${vcf} \
   -o ${file_id[0]}_genome.fasta
-- 
GitLab