Commit ccfed547 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

add scala docs

parent 91da1128
......@@ -23,6 +23,7 @@ import argonaut._, Argonaut._
import scalaz._, Scalaz._
import scala.io.Source
/** Extension for md5sum */
class Md5sum(val root: Configurable) extends BiopetCommandLineFunction {
@Input(doc = "Input")
var input: File = _
......
......@@ -20,6 +20,7 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import java.io.File
/** Extension for pbzip2 */
class Pbzip2(val root: Configurable) extends BiopetCommandLineFunction {
@Input(doc = "Zipped file")
var input: File = _
......@@ -39,6 +40,7 @@ class Pbzip2(val root: Configurable) extends BiopetCommandLineFunction {
if (!memory.isEmpty) memory = Option(memory.get * threads)
}
/** return commandline to execute */
def cmdLine = required(executable) +
conditional(decomrpess, "-d") +
conditional(!decomrpess, "-z") +
......@@ -48,7 +50,9 @@ class Pbzip2(val root: Configurable) extends BiopetCommandLineFunction {
required(input)
}
/** Object for constructors for Pbzip2 */
object Pbzip2 {
/** Default constructor */
def apply(root: Configurable, input: File, output: File): Pbzip2 = {
val pbzip2 = new Pbzip2(root)
pbzip2.input = input
......
......@@ -28,6 +28,11 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
executable = config("exe", default = "python", submodule = "python")
protected var python_script_name: String = _
/**
* checks if script already exist in jar otherwise try to fetch from the jar
* @param script name / location of script
*/
def setPythonScript(script: String) {
python_script = new File(script)
if (!python_script.exists()) {
......@@ -36,6 +41,12 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
python_script_name = script
}
}
/**
* Set and extract python script from jar file
* @param script name of script in jar
* @param subpackage location of script in jar
*/
def setPythonScript(script: String, subpackage: String) {
python_script_name = script
python_script = new File(".queue/tmp/" + subpackage + python_script_name)
......@@ -46,6 +57,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
os.close()
}
/** return basic command to prefix the complete command with */
def getPythonCommand(): String = {
required(executable) + required(python_script)
}
......
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