Commit 2a22fa63 authored by wyleung's avatar wyleung
Browse files

Adding tophat

parent 85495563
package nl.lumc.sasc.biopet.extensions.aligners
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
class TopHat(val root: Configurable) extends BiopetCommandLineFunction {
@Input(doc = "FastQ file R1", shortName = "R1")
var R1: File = _
@Input(doc = "FastQ file R2", shortName = "R2", required = false)
var R2: File = _
@Input(doc = "Bowtie index", shortName = "bti")
var bowtie_index: File = config("bowtie_index", required = true)
@Argument(doc = "Output Directory")
var outputDir: String = _
@Output(doc = "Output file SAM", shortName = "output")
var output: File = _
// options set via API or config
// var numrecords: String = config("numrecords", default = "all")
// var solexa: Boolean = config("solexa", default = false)
// var solexaold: Boolean = config("solexaold", default = false)
// var sanger: Boolean = config("sanger", default = false)
//
// var insertsize: Option[Int] = config("insertsize", default = 250)
// var insertsd: Option[Int] = config("insertsd", default = 60)
// var insertsize2: Option[Int] = config("insertsize2", default = -2000)
// var insertsd2: Option[Int] = config("insertsd2", default = -1)
//
// var sensitive: Boolean = config("sensitive", default = false)
// var fast: Boolean = config("fast", default = false)
//
// var readgroup: String = config("readgroup")
// var verbosity: Option[Int] = config("verbosity", default = 2)
// var logfile: String = config("logfile")
executable = config("exe", default = "tophat", freeVar = false)
override val versionRegex = """TopHat v(.*)""".r
override val versionExitcode = List(0, 1)
override val defaultVmem = "4G"
override val defaultThreads = 8
override def versionCommand = executable + " --version"
override def afterGraph() {
if (!outputDir.endsWith("/")) outputDir += "/"
output = new File(outputDir + "accepted_hits.bam")
}
def cmdLine: String = {
var cmd: String = required(executable) +
optional("-p", nCoresRequest) +
"--no-convert-bam" +
required(bowtie_index) +
required(R1) + optional(R2)
return cmd
}
}
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