DellyCaller.scala 1.02 KB
Newer Older
1
package nl.lumc.sasc.biopet.extensions.delly
2 3 4 5 6

import java.io.File

import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
Peter van 't Hof's avatar
Peter van 't Hof committed
7
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
8 9 10 11 12 13

class DellyCaller(val root: Configurable) extends BiopetCommandLineFunction {
  executable = config("exe", default = "delly")

  private lazy val versionexecutable: File = new File(executable)

Peter van 't Hof's avatar
Peter van 't Hof committed
14
  override def defaultThreads = 1
Peter van 't Hof's avatar
Peter van 't Hof committed
15
  override def defaultCoreMemory = 4.0
16 17

  override def versionCommand = versionexecutable.getAbsolutePath
Peter van 't Hof's avatar
Peter van 't Hof committed
18 19
  override def versionRegex = """DELLY \(Version: (.*)\)""".r
  override def versionExitcode = List(0, 1)
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

  @Input(doc = "Input file (bam)")
  var input: File = _

  @Output(doc = "Delly VCF output")
  var outputvcf: File = _

  @Argument(doc = "What kind of analysis to run: DEL,DUP,INV,TRA")
  var analysistype: String = _

  def cmdLine = required(executable) +
    "-t" + required(analysistype) +
    "-o" + required(outputvcf) +
    required(input)

}