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

Fixed summary

parent 6b75aecd
......@@ -29,7 +29,8 @@ class ExtractUnmappedReads(val root: Configurable) extends QScript with BiopetQS
}
def fastqUnmappedR1 = new File(outputDir, s"$outputName.unmapped.R1.fq.gz")
def fastqUnmappedR2 = new File(outputDir, s"$outputName.unmapped.R2.fq.gz")
def fastqUnmappedR2 = if (paired) Some(new File(outputDir, s"$outputName.unmapped.R2.fq.gz"))
else None
def fastqUnmappedSingletons = new File(outputDir, s"$outputName.unmapped.singletons.fq.gz")
def biopetScript(): Unit = {
......@@ -48,7 +49,7 @@ class ExtractUnmappedReads(val root: Configurable) extends QScript with BiopetQS
samToFastq.input = samtoolsViewSelectUnmapped.output
samToFastq.fastqR1 = fastqUnmappedR1
if (paired) {
samToFastq.fastqR2 = fastqUnmappedR2
samToFastq.fastqR2 = fastqUnmappedR2.get
samToFastq.fastqUnpaired = fastqUnmappedSingletons
}
samToFastq.isIntermediate = !config("keep_unmapped_fastq", default = false).asBoolean
......
......@@ -97,7 +97,7 @@ class GearsKraken(val root: Configurable) extends QScript with SummaryQScript wi
/** Statistics shown in the summary file */
def summaryFiles: Map[String, File] = outputFiles + ("input_R1" -> fastqR1) ++ (fastqR2 match {
case Some(file) => Map("input_R1" -> file)
case Some(file) => Map("input_R2" -> file)
case _ => Map()
})
}
......
......@@ -97,7 +97,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
extract.bamFile = bam
extract.outputName = outputName
add(extract)
executeFlexiprep(extract.fastqUnmappedR1, Some(extract.fastqUnmappedR2))
executeFlexiprep(extract.fastqUnmappedR1, extract.fastqUnmappedR2)
case _ => throw new IllegalArgumentException("Missing input files")
}
......@@ -159,6 +159,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
def summaryFiles: Map[String, File] = Map.empty ++
(if (bamFile.isDefined) Map("input_bam" -> bamFile.get) else Map()) ++
(if (fastqR1.isDefined) Map("input_R1" -> fastqR1.get) else Map()) ++
(if (fastqR2.isDefined) Map("input_R2" -> fastqR2.get) else Map()) ++
outputFiles
}
......
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