Commit b1f87b25 authored by Wai Yi Leung's avatar Wai Yi Leung

Extracted IGVTools from Yamsvp

parent c2fb1f5b
/**
* Created by wyleung on 5-1-15.
*/
package nl.lumc.sasc.biopet.extensions.igvtools
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
abstract class IGVTools extends BiopetCommandLineFunction {
executable = config("exe", default = "igvtools", submodule = "igvtools", freeVar = false)
override def versionCommand = executable + " version"
override val versionRegex = """IGV Version: ([\d\.]) .*""".r
override val versionExitcode = List(0)
}
\ No newline at end of file
package nl.lumc.sasc.biopet.extensions.igvtools
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
class IGVToolsCount(val root: Configurable) extends IGVTools {
@Input(doc = "Bam File")
var input: File = _
@Argument(doc = "Genome name")
var genomename: String = _
@Output(doc = "output File")
var output: File = _
def cmdLine = required(executable) + required("count") + required(input) + required(output) + required(genomename)
}
object IGVToolsCount {
def apply(root: Configurable, input: File, output: File, genomename: String): IGVToolsCount = {
val counting = new IGVToolsCount(root)
counting.input = input
counting.output = output
counting.genomename = genomename
return counting
}
def apply(root: Configurable, input: File, genomename: String): IGVToolsCount = {
return apply(root, input, new File(swapExtension(input.getCanonicalPath)), genomename)
}
private def swapExtension(inputFile: String) = inputFile + ".tdf"
}
\ No newline at end of file
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