Commit 61896d06 authored by Peter van 't Hof's avatar Peter van 't Hof

Convert igvtools to a java extensions

parent e5384fc2
...@@ -14,16 +14,17 @@ ...@@ -14,16 +14,17 @@
*/ */
package nl.lumc.sasc.biopet.extensions.igvtools package nl.lumc.sasc.biopet.extensions.igvtools
import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } import nl.lumc.sasc.biopet.core.{ BiopetJavaCommandLineFunction, Version }
/** /**
* General igvtools extension * General igvtools extension
* *
* Created by wyleung on 5-1-15 * Created by wyleung on 5-1-15
*/ */
abstract class IGVTools extends BiopetCommandLineFunction with Version { abstract class IGVTools extends BiopetJavaCommandLineFunction with Version {
executable = config("exe", default = "igvtools", namespace = "igvtools", freeVar = false) jarFile = config("igvtools_jar", namespace = "igvtools")
def versionCommand = executable + " version"
def versionCommand = executable + s" -jar ${jarFile.getAbsolutePath} version"
def versionRegex = """IGV Version:? ([\w\.]*) .*""".r def versionRegex = """IGV Version:? ([\w\.]*) .*""".r
override def versionExitcode = List(0) override def versionExitcode = List(0)
} }
\ No newline at end of file
...@@ -76,25 +76,23 @@ class IGVToolsCount(val root: Configurable) extends IGVTools { ...@@ -76,25 +76,23 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
} }
/** Returns command to execute */ /** Returns command to execute */
def cmdLine = { override def cmdLine = super.cmdLine +
required(executable) + required("count") +
required("count") + optional("--maxZoom", maxZoom) +
optional("--maxZoom", maxZoom) + optional("--windowSize", windowSize) +
optional("--windowSize", windowSize) + optional("--extFactor", extFactor) +
optional("--extFactor", extFactor) + optional("--preExtFactor", preExtFactor) +
optional("--preExtFactor", preExtFactor) + optional("--postExtFactor", postExtFactor) +
optional("--postExtFactor", postExtFactor) + optional("--windowFunctions", windowFunctions) +
optional("--windowFunctions", windowFunctions) + optional("--strands", strands) +
optional("--strands", strands) + conditional(bases, "--bases") +
conditional(bases, "--bases") + optional("--query", query) +
optional("--query", query) + optional("--minMapQuality", minMapQuality) +
optional("--minMapQuality", minMapQuality) + conditional(includeDuplicates, "--includeDuplicates") +
conditional(includeDuplicates, "--includeDuplicates") + conditional(pairs, "--pairs") +
conditional(pairs, "--pairs") + required(input) +
required(input) + required(outputArg) +
required(outputArg) + required(genomeChromSizes)
required(genomeChromSizes)
}
/** This part should never fail, these values are set within this wrapper */ /** This part should never fail, these values are set within this wrapper */
private def outputArg: String = { private def outputArg: String = {
......
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