Commit cb4cfc7e authored by Peter van 't Hof's avatar Peter van 't Hof

Workaround for making indexes

parent a0cfa199
......@@ -16,6 +16,7 @@ package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.extensions.Tabix
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
......@@ -27,8 +28,13 @@ class GatherVcfs(val parent: Configurable) extends Picard {
@Output(doc = "The output file to bam file to", required = true)
var output: File = _
override def cmdLine =
val tabix: Option[Tabix] = if (createIndex) Some(Tabix(this, output)) else None
override def cmdLine: String =
super.cmdLine +
repeat("INPUT=", input, spaceSeparated = false) +
required("OUTPUT=", output, spaceSeparated = false)
required("OUTPUT=", output, spaceSeparated = false) + (tabix match {
case Some(t) => s" && ${t.cmdLine}"
case _ => ""
})
}
......@@ -50,7 +50,7 @@ abstract class Picard extends BiopetJavaCommandLineFunction with Version {
var maxRecordsInRam: Option[Int] = config("maxrecordsinram")
@Argument(doc = "CREATE_INDEX", required = false)
var createIndex: Boolean = config("createindex", default = true)
val createIndex: Boolean = config("createindex", default = true)
@Argument(doc = "CREATE_MD5_FILE", required = false)
var createMd5: Boolean = config("createmd5", default = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment