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

Adding summary stats

parent 6fc77a78
......@@ -183,12 +183,14 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
qcCmdR1.output = if (paired) new File("/dev/stdout")
else fastqR1Qc
qcCmdR1.isIntermediate = paired || !keepQcFastqFiles
addSummarizable(qcCmdR1, "qc_command_R1")
if (paired) {
val qcCmdR2 = new QcCommand(this, fastqc_R2)
qcCmdR2.input = R2_in.get
qcCmdR2.output = new File("/dev/stdout")
qcCmdR2.read = "R2"
addSummarizable(qcCmdR2, "qc_command_R2")
qcCmdR1.compress = false
qcCmdR2.compress = false
......
......@@ -2,6 +2,7 @@ package nl.lumc.sasc.biopet.pipelines.flexiprep
import java.io.File
import nl.lumc.sasc.biopet.core.summary.{SummaryQScript, Summarizable}
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, BiopetPipe }
import nl.lumc.sasc.biopet.extensions.{ Cat, Gzip, Sickle, Cutadapt }
import nl.lumc.sasc.biopet.extensions.seqtk.SeqtkSeq
......@@ -11,7 +12,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by pjvan_thof on 9/22/15.
*/
class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetCommandLineFunction {
class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetCommandLineFunction with Summarizable {
val flexiprep = root match {
case f: Flexiprep => f
......@@ -35,6 +36,21 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
var clip: Option[Cutadapt] = None
var trim: Option[Sickle] = None
def summaryFiles = Map()
def summaryStats = Map()
override def addToQscriptSummary(qscript: SummaryQScript, name: String): Unit = {
clip match {
case Some(job) => qscript.addSummarizable(job, s"clipping_$read")
case _ =>
}
trim match {
case Some(job) => qscript.addSummarizable(job, s"trimming_$read")
case _ =>
}
}
override def beforeGraph(): Unit = {
super.beforeGraph()
require(read != null)
......
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