Commit a2a08716 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Sync with develop changes

parent 06c874ae
......@@ -18,12 +18,12 @@ package nl.lumc.sasc.biopet.extensions.kraken
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
/** Extension for Kraken */
class Kraken(val root: Configurable) extends BiopetCommandLineFunction {
class Kraken(val root: Configurable) extends BiopetCommandLineFunction with Version {
@Input(doc = "Input: FastQ or FastA")
var input: List[File] = _
......@@ -46,9 +46,9 @@ class Kraken(val root: Configurable) extends BiopetCommandLineFunction {
var paired: Boolean = config("paired", default = false)
executable = config("exe", default = "kraken")
override def versionRegex = """^Kraken version ([\d\w\-\.]+)""".r
def versionRegex = """^Kraken version ([\d\w\-\.]+)""".r
override def versionExitcode = List(0, 1)
override def versionCommand = executable + " --version"
def versionCommand = executable + " --version"
override def defaultCoreMemory = 8.0
override def defaultThreads = 4
......
......@@ -15,17 +15,17 @@
*/
package nl.lumc.sasc.biopet.extensions.sambamba
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
/** General Sambamba extension */
abstract class Sambamba extends BiopetCommandLineFunction {
abstract class Sambamba extends BiopetCommandLineFunction with Version {
override def defaultCoreMemory = 2.0
override def defaultThreads = 2
override def subPath = "sambamba" :: super.subPath
executable = config("exe", default = "sambamba", submodule = "sambamba")
override def versionCommand = executable
override def versionRegex = """sambamba v(.*)""".r
def versionCommand = executable
def versionRegex = """sambamba v(.*)""".r
override def versionExitcode = List(0, 1)
}
\ No newline at end of file
......@@ -3,21 +3,20 @@ package nl.lumc.sasc.biopet.extensions.tools
/**
* Created by waiyileung on 05-10-15.
*/
import java.io.File
import nl.lumc.sasc.biopet.core.ToolCommandFuntion
import nl.lumc.sasc.biopet.core.ToolCommandFunction
import nl.lumc.sasc.biopet.core.summary.Summarizable
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Output, Input }
import org.broadinstitute.gatk.utils.commandline.{Argument, Input, Output}
/**
* KrakenReportToJson function class for usage in Biopet pipelines
*
* @param root Configuration object for the pipeline
*/
class KrakenReportToJson(val root: Configurable) extends ToolCommandFuntion with Summarizable {
class KrakenReportToJson(val root: Configurable) extends ToolCommandFunction with Summarizable {
def toolObject = nl.lumc.sasc.biopet.tools.KrakenReportToJson
@Input(doc = "Input Kraken Full report", shortName = "inputReport", required = true)
......@@ -31,10 +30,11 @@ class KrakenReportToJson(val root: Configurable) extends ToolCommandFuntion with
override def defaultCoreMemory = 1.0
override def cmdLine = super.cmdLine +
required("-i", inputReport) +
required("-o", output) +
conditional(skipNames, "--skipnames")
override def cmdLine =
super.cmdLine +
required("-i", inputReport) +
required("-o", output) +
conditional(skipNames, "--skipnames")
def summaryStats: Map[String, Any] = {
ConfigUtils.fileToConfigMap(output)
......
Supports Markdown
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