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

Still executes multisample jobs when all samples are given with --sample flag

parent ad73824f
......@@ -87,8 +87,8 @@ trait BiopetQScript extends Configurable with GatkLogging {
else Logging.addError("Parent of output dir: '" + outputDir.getParent + "' is not writeable, outputdir can not be created")
this match {
case q: MultiSampleQScript if (q.onlySamples.nonEmpty) =>
logger.info("Write summary is skipped because sample flag is used")
case q: MultiSampleQScript if q.onlySamples.nonEmpty && !q.samples.forall(x => q.onlySamples.contains(x._1)) =>
logger.info("Write report is skipped because sample flag is used")
case _ => reportClass.foreach(add(_))
}
......
......@@ -131,7 +131,7 @@ trait MultiSampleQScript extends SummaryQScript {
/** Runs addAndTrackJobs method for each sample */
final def addSamplesJobs() {
if (onlySamples.isEmpty) {
if (onlySamples.isEmpty || samples.forall(x => onlySamples.contains(x._1))) {
samples.foreach { case (sampleId, sample) => sample.addAndTrackJobs() }
addMultiSampleJobs()
} else onlySamples.foreach(sampleId => samples.get(sampleId) match {
......
......@@ -136,7 +136,7 @@ trait SummaryQScript extends BiopetQScript {
addChecksum(file)
this match {
case q: MultiSampleQScript if (q.onlySamples.nonEmpty) =>
case q: MultiSampleQScript if q.onlySamples.nonEmpty && !q.samples.forall(x => q.onlySamples.contains(x._1)) =>
logger.info("Write summary is skipped because sample flag is used")
case _ => add(writeSummary)
}
......
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