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

Moved flash as general job

parent 1cdd1970
......@@ -19,9 +19,7 @@ import scala.xml.{ PrettyPrinter, Elem }
*/
class GearsQiimeClosed(val root: Configurable) extends QScript with SummaryQScript with SampleLibraryTag {
var fastqR1: File = _
var fastqR2: Option[File] = None
var fastqInput: File = _
override def defaults = Map(
"splitlibrariesfastq" -> Map(
......@@ -30,7 +28,7 @@ class GearsQiimeClosed(val root: Configurable) extends QScript with SummaryQScri
)
def init() = {
require(fastqR1 != null)
require(fastqInput != null)
}
private var _otuMap: File = _
......@@ -41,19 +39,8 @@ class GearsQiimeClosed(val root: Configurable) extends QScript with SummaryQScri
def biopetScript() = {
val fastqFile = fastqR2 match {
case Some(r2) =>
val flash = new Flash(this)
flash.outputDirectory = new File(outputDir, "combine_reads_flash")
flash.fastqR1 = fastqR1
flash.fastqR2 = r2
add(flash)
flash.combinedFastq
case _ => fastqR1
}
val splitLib = new SplitLibrariesFastq(this)
splitLib.input :+= fastqFile
splitLib.input :+= fastqInput
splitLib.outputDir = new File(outputDir, "split_libraries_fastq")
sampleId.foreach(splitLib.sample_ids :+= _)
add(splitLib)
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.pipelines.gears
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.BiopetQScript.InputFile
import nl.lumc.sasc.biopet.core.{ PipelineCommand, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.Flash
import nl.lumc.sasc.biopet.pipelines.flexiprep.Flexiprep
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......@@ -100,6 +101,19 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
case _ => throw new IllegalArgumentException("Missing input files")
}
lazy val combinedFastq = {
r2 match {
case Some(r2) =>
val flash = new Flash(this)
flash.outputDirectory = new File(outputDir, "combine_reads_flash")
flash.fastqR1 = r1
flash.fastqR2 = r2
add(flash)
flash.combinedFastq
case _ => r1
}
}
krakenScript foreach { kraken =>
kraken.outputDir = new File(outputDir, "kraken")
kraken.fastqR1 = r1
......@@ -117,8 +131,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
qiimeClosed foreach { qiimeClosed =>
qiimeClosed.outputDir = new File(outputDir, "qiime_closed")
qiimeClosed.fastqR1 = r1
qiimeClosed.fastqR2 = r2
qiimeClosed.fastqInput = combinedFastq
add(qiimeClosed)
//TODO: Plots
......
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