From 0929d42524254b1b6a5b03a5e650c30dc92857c6 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Mon, 30 Nov 2015 09:41:02 +0100
Subject: [PATCH] Added bam index file as output file

---
 .../sasc/biopet/extensions/gatk/broad/IndelRealigner.scala   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala
index 44a3eac66..32cf797a0 100644
--- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala
+++ b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala
@@ -8,8 +8,12 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
 import java.io.File
 
 import nl.lumc.sasc.biopet.utils.config.Configurable
+import org.broadinstitute.gatk.utils.commandline.Output
 
 class IndelRealigner(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.IndelRealigner with GatkGeneral {
+  @Output
+  protected var bamIndex: File = _
+
   if (config.contains("scattercount")) scatterCount = config("scattercount")
 }
 
@@ -19,6 +23,7 @@ object IndelRealigner {
     ir.input_file :+= input
     ir.targetIntervals = targetIntervals
     ir.out = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.bam")
+    ir.bamIndex = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.bai")
     ir
   }
 }
\ No newline at end of file
-- 
GitLab