diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala index a1ce42408cf1ffe69ac3d1a3b92db8ead9de2f71..fa177b8fe4cd52cfee1307dbb4e9aeeb5ded4e08 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala @@ -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 = _ diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala index 03f76abd6162f5759fb772158a5f1dc941012b1c..6756c5eafc7ab5b9a3ba1fd60fc89154bc0aa0df 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala @@ -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 diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala index ebfaac812bbedec10a14d0daad609d54469f9c03..cf088cb29fa57d66b1fb9fe24b247054e0ae2edc 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala @@ -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) }