From 3ff377eb0bed66895216f7ea11a8b56529e6ca6e Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Thu, 16 Apr 2015 09:53:02 +0200 Subject: [PATCH] Added BedToIntervalList extension --- .../extensions/picard/BedToIntervalList.scala | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala new file mode 100644 index 000000000..2faef859c --- /dev/null +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala @@ -0,0 +1,36 @@ +package nl.lumc.sasc.biopet.extensions.picard + +import java.io.File + +import nl.lumc.sasc.biopet.core.config.Configurable +import org.broadinstitute.gatk.utils.commandline.{Output, Input} + +/** + * Created by pjvan_thof on 4/15/15. + */ +class BedToIntervalList(val root: Configurable) extends Picard { + javaMainClass = new picard.util.BedToIntervalList().getClass.getName + + @Input(doc = "Input bed file", required = true) + var input: File = null + + @Input(doc = "Reference dict file", required = true) + var dict: File = new File(config("reference").asString.stripSuffix(".fa").stripSuffix(".fasta") + ".dict") + + @Output(doc = "Output interval list", required = true) + var output: File = null + + override def commandLine = super.commandLine + + required("SEQUENCE_DICTIONARY=", dict, spaceSeparated = false) + + required("INPUT=", input, spaceSeparated = false) + + required("OUTPUT=", output, spaceSeparated = false) +} + +object BedToIntervalList { + def apply(root:Configurable, input:File, output:File): BedToIntervalList = { + val bi = new BedToIntervalList(root) + bi.input = input + bi.output = output + bi + } +} \ No newline at end of file -- GitLab