From ac55982a7acf3c06460ae0b8ac2c394865eeaa4c Mon Sep 17 00:00:00 2001
From: dcats <d.cats@lumc.nl>
Date: Fri, 18 Mar 2022 12:46:53 +0100
Subject: [PATCH] run tabix if vcf index is missing in gridss

---
 gridss.wdl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gridss.wdl b/gridss.wdl
index d3d251a..92d7df1 100644
--- a/gridss.wdl
+++ b/gridss.wdl
@@ -116,6 +116,12 @@ task GRIDSS {
         ~{normalBam} \
         ~{tumorBam}
         samtools index ~{outputPrefix}_assembly.bam ~{outputPrefix}_assembly.bai
+
+        # For some reason the VCF index is sometimes missing
+        if [ ! -e ~{outputPrefix}.vcf.gz.tbi ]
+          then
+            tabix ~{outputPrefix}.vcf.gz
+        fi
     }
 
     output {
-- 
GitLab