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

Fix graph issues

parent 6cb4dcbe
...@@ -195,6 +195,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -195,6 +195,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
override def beforeGraph(): Unit = { override def beforeGraph(): Unit = {
fqSync.beforeGraph() fqSync.beforeGraph()
commands = qcCmdR1.jobs ::: qcCmdR2.jobs ::: fqSync :: Nil
super.beforeGraph() super.beforeGraph()
} }
......
...@@ -50,7 +50,15 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman ...@@ -50,7 +50,15 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
val seqtk = new SeqtkSeq(root) val seqtk = new SeqtkSeq(root)
var clip: Option[Cutadapt] = None var clip: Option[Cutadapt] = None
var trim: Option[Sickle] = None var trim: Option[Sickle] = None
var outputCommand: BiopetCommandLineFunction = null lazy val outputCommand: BiopetCommandLineFunction = if (compress) {
val gzip = Gzip(root)
gzip.output = output
gzip
} else {
val cat = Cat(root)
cat.output = output
cat
}
def jobs = (Some(seqtk) :: clip :: trim :: Some(outputCommand) :: Nil).flatten def jobs = (Some(seqtk) :: clip :: trim :: Some(outputCommand) :: Nil).flatten
...@@ -123,16 +131,9 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman ...@@ -123,16 +131,9 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
case _ => seqtk.output case _ => seqtk.output
} }
if (compress) outputCommand = { outputCommand match {
val gzip = new Gzip(root) case gzip: Gzip => outputFile :<: gzip
gzip.output = output case cat: Cat => cat.input = outputFile :: Nil
outputFile :<: gzip
}
else outputCommand = {
val cat = new Cat(root)
cat.input = outputFile :: Nil
cat.output = output
cat
} }
seqtk.beforeGraph() seqtk.beforeGraph()
......
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