Commit 21fa48ed authored by Sander Bollen's avatar Sander Bollen

Merge branch 'fix-BIOPET-412' into 'develop'

Fix BIOPET-412

Fix BIOPET-412

See merge request !487
parents 2221fa53 b747862a
......@@ -57,7 +57,7 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
for (q <- qscript.summaryQScripts)
deps :+= q.summaryFile
for ((_, l) <- qscript.summarizables; s <- l) s match {
case f: QFunction => try {
case f: QFunction if qscript.functions.contains(f) => try {
deps :+= f.firstOutput
} catch {
case e: NullPointerException => logger.warn("Queue values are not init")
......
......@@ -54,12 +54,14 @@ class CombineReads(val root: Configurable) extends QScript with SummaryQScript w
swapExt(outputDir, flash.notCombinedR2, ".fastq.gz", ".clip.fastq.gz")
else flash.notCombinedR2
val keepFastaqFiles: Boolean = config("keep_fastq_files", default = false)
/** Pipeline itself */
def biopetScript(): Unit = {
flash.outputDirectory = new File(outputDir, "flash")
flash.fastqR1 = fastqR1
flash.fastqR2 = fastqR2
flash.isIntermediate = (forwardPrimers ::: reversePrimers).nonEmpty
flash.isIntermediate = !keepFastaqFiles || (forwardPrimers ::: reversePrimers).nonEmpty
add(flash)
if ((forwardPrimers ::: reversePrimers).nonEmpty) {
......@@ -67,6 +69,7 @@ class CombineReads(val root: Configurable) extends QScript with SummaryQScript w
cutadapt.fastqInput = flash.combinedFastq
cutadapt.fastqOutput = this.combinedFastq
cutadapt.statsOutput = swapExt(outputDir, cutadapt.fastqOutput, ".fastq.gz", ".stats")
cutadapt.isIntermediate = !keepFastaqFiles
(forwardPrimers ::: reversePrimers).foreach(cutadapt.anywhere += _)
add(cutadapt)
addSummarizable(cutadapt, "cutadapt")
......
......@@ -58,6 +58,7 @@ class GearsQiimeClosed(val root: Configurable) extends QScript with SummaryQScri
splitLib.input :+= fastqInput
splitLib.outputDir = new File(outputDir, "split_libraries_fastq")
sampleId.foreach(splitLib.sampleIds :+= _.replaceAll("_", "-"))
splitLib.isIntermediate = true
add(splitLib)
val closedReference = new PickClosedReferenceOtus(this)
......
......@@ -51,6 +51,7 @@ class GearsQiimeOpen(val root: Configurable) extends QScript with SummaryQScript
splitLib.input :+= fastqInput
splitLib.outputDir = new File(outputDir, "split_libraries_fastq")
sampleId.foreach(splitLib.sampleIds :+= _.replaceAll("_", "-"))
splitLib.isIntermediate = true
add(splitLib)
val openReference = new PickOpenReferenceOtus(this)
......
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