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

Remove addSummaryJobs()

parent 89b7a259
...@@ -133,12 +133,11 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript => ...@@ -133,12 +133,11 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
case that: SummaryQScript => case that: SummaryQScript =>
that.init() that.init()
that.biopetScript() that.biopetScript()
that.addSummaryJobs()
this match { this match {
case s: SummaryQScript => s.addSummaryQScript(that) case s: SummaryQScript => s.addSummaryQScript(that)
case _ => case _ =>
} }
case that:BiopetQScript => case that: BiopetQScript =>
that.init() that.init()
that.biopetScript() that.biopetScript()
case _ => subPipeline.script case _ => subPipeline.script
......
...@@ -92,8 +92,11 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript => ...@@ -92,8 +92,11 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
summaryQScripts :+= summaryQScript summaryQScripts :+= summaryQScript
} }
private var addedJobs = false
/** Add jobs to qscript to execute summary, also add checksum jobs */ /** Add jobs to qscript to execute summary, also add checksum jobs */
def addSummaryJobs(): Unit = { def addSummaryJobs(): Unit = {
if (addedJobs) throw new IllegalStateException("Summary jobs for this QScript are already executed")
val writeSummary = new WriteSummary(this) val writeSummary = new WriteSummary(this)
def addChecksum(file: File): Unit = { def addChecksum(file: File): Unit = {
...@@ -160,6 +163,8 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript => ...@@ -160,6 +163,8 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
logger.info("Write summary is skipped because sample flag is used") logger.info("Write summary is skipped because sample flag is used")
case _ => add(writeSummary) case _ => add(writeSummary)
} }
addedJobs = true
} }
} }
......
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