From 2820a5009e758836d7d41c539fd420b2f5dd4ba2 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Wed, 10 Mar 2021 15:13:06 +0100
Subject: [PATCH] gatk4: add vcf indexing for BaseRecalibartor

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

diff --git a/src/nf_modules/gatk4/main.nf b/src/nf_modules/gatk4/main.nf
index 63803f26..82526e7f 100644
--- a/src/nf_modules/gatk4/main.nf
+++ b/src/nf_modules/gatk4/main.nf
@@ -125,6 +125,10 @@ process recalibrate_snp_table {
   script:
   xmx_memory = "${task.memory}" - ~/\s*GB/
 """
+gatk --java-options "-Xmx${xmx_memory}G" IndexFeatureFile \
+  -I ${snp_file}
+gatk --java-options "-Xmx${xmx_memory}G" IndexFeatureFile \
+  -I ${indel_file}
 gatk --java-options "-Xmx${xmx_memory}G" BaseRecalibrator \
   -R ${fasta} \
   -I ${bam} \
-- 
GitLab