diff --git a/gridss.wdl b/gridss.wdl
index d0428e59d59ee9c74594750fcde6ffcd06ff9bd0..c12c24d6c4ffd10fc1842c06e167000fb275e9d3 100644
--- a/gridss.wdl
+++ b/gridss.wdl
@@ -90,6 +90,8 @@ task AnnotateSvTypes {
         Int timeMinutes = 240
     }
 
+    String index = if sub(outputPath, "\\.bgz", "") != outputPath then "T" else "F"
+
     # Based on https://github.com/PapenfussLab/gridss/issues/74
     command <<<
         set -e
@@ -115,7 +117,7 @@ task AnnotateSvTypes {
         gr <- breakpointRanges(vcf)
         svtype <- simpleEventType(gr)
         info(vcf[gr$sourceId])$SVTYPE <- svtype
-        writeVcf(vcf, out_path, index=T)
+        writeVcf(vcf, out_path, index=~{index})
         EOF
     >>>