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

Added deps to constructor

parent aa2484da
......@@ -82,20 +82,22 @@ class Star(val root: Configurable) extends BiopetCommandLineFunction {
}
object Star {
def apply(configurable: Configurable, R1: File, R2: File, outputDir: String, isIntermediate: Boolean = false): Star = {
def apply(configurable: Configurable, R1: File, R2: File, outputDir: String, isIntermediate: Boolean = false, deps:List[File] = Nil): Star = {
val star = new Star(configurable)
star.R1 = R1
if (R2 != null) star.R2 = R2
star.outputDir = outputDir
star.isIntermediate = isIntermediate
star.deps = deps
star.afterGraph
return star
}
def _2pass(configurable: Configurable, R1: File, R2: File, outputDir: String, isIntermediate: Boolean = false): (File, List[Star]) = {
def _2pass(configurable: Configurable, R1: File, R2: File, outputDir: String, isIntermediate: Boolean = false, deps:List[File] = Nil): (File, List[Star]) = {
val outDir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
val starCommand_pass1 = Star(configurable, R1, if (R2 != null) R2 else null, outDir + "aln-pass1/")
starCommand_pass1.isIntermediate = isIntermediate
starCommand_pass1.deps = deps
starCommand_pass1.afterGraph
val starCommand_reindex = new Star(configurable)
......@@ -108,6 +110,7 @@ object Star {
val starCommand_pass2 = Star(configurable, R1, if (R2 != null) R2 else null, outDir + "aln-pass2/")
starCommand_pass2.genomeDir = starCommand_reindex.outputDir
starCommand_pass2.isIntermediate = isIntermediate
starCommand_pass2.deps = deps
starCommand_pass2.afterGraph
return (starCommand_pass2.outputSam, List(starCommand_pass1, starCommand_reindex, starCommand_pass2))
......
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