From f095411493353ffbb919589e87113fd8a9b4d6e4 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Wed, 4 Mar 2015 14:39:00 +0100 Subject: [PATCH] Added tabix --- .../lumc/sasc/biopet/extensions/Tabix.scala | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala new file mode 100644 index 000000000..0653abf52 --- /dev/null +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala @@ -0,0 +1,30 @@ +package nl.lumc.sasc.biopet.extensions + +import java.io.File + +import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction +import nl.lumc.sasc.biopet.core.config.Configurable +import org.broadinstitute.gatk.utils.commandline.{Output, Input} + +/** + * Created by pjvan_thof on 3/4/15. + */ +class Tabix(val root: Configurable) extends BiopetCommandLineFunction { + + @Input(doc = "Input files", required = true) + var input: File = null + + @Output(doc = "Compressed output file", required = true) + protected var output: File = null + + var p: Option[String] = config("p") + executable = config("exe", default = "bgzip") + + override def beforeGraph: Unit = { + output = new File(input.getAbsolutePath + ".tbi") + } + + def cmdLine = required(executable) + + optional("-p", p) + + required(input) +} \ No newline at end of file -- GitLab