Commit 66d4e1a8 authored by rhpvorderman's avatar rhpvorderman

Add appropriate some types for plot generator

parent 8078bfbd
......@@ -26,8 +26,8 @@
<%@ var librariesCount: Int %>
<%@ var clipCount: Int %>
<%@ var paired: Boolean %>
<%@ var summaryPlotLinesR1: Seq[String] %>
<%@ var summaryPlotLinesR2: Seq[String] %>
<%@ var summaryPlotLinesR1: Some[Seq[String]] %>
<%@ var summaryPlotLinesR2: Some[Seq[String]] %>
<%@ var samples: Seq[Sample] %>
<%@ var libraries: Seq[Library] %>
<%@ var settings: Map[(Int, Int), Map[String, Option[Any]]]%>
......@@ -70,8 +70,8 @@
#end
#if (showPlot)
#{
FlexiprepReport.baseSummaryPlot(outputDir, "QC_Bases_R1","R1", summaryPlotLinesR1)
if (paired) FlexiprepReport.baseSummaryPlot(outputDir, "QC_Bases_R2","R2", summaryPlotLinesR2)
FlexiprepReport.baseSummaryPlot(outputDir, "QC_Bases_R1","R1", summaryPlotLinesR1.getOrElse(Seq("")))
if (paired) FlexiprepReport.baseSummaryPlot(outputDir, "QC_Bases_R2","R2", summaryPlotLinesR2.getOrElse(Seq("")))
}#
<div class="panel-body">
<div class="row">
......
......@@ -25,8 +25,8 @@
<%@ var seqstatQCStats: Map[(Int, Int), Map[String, Option[Any]]] %>
<%@ var clippingStats: Map[(Int, Int), Map[String, Option[Any]]] %>
<%@ var trimmingStats: Map[(Int, Int), Map[String, Option[Any]]] %>
<%@ var summaryPlotLinesR1: Seq[String] %>
<%@ var summaryPlotLinesR2: Seq[String] %>
<%@ var summaryPlotLinesR1: Some[Seq[String]] %>
<%@ var summaryPlotLinesR2: Some[Seq[String]] %>
#if (showIntro)
<br/>
......@@ -69,8 +69,8 @@
#if (showPlot)
#{
FlexiprepReport.readSummaryPlot(outputDir, "QC_Reads_R1","R1", summaryPlotLinesR1)
if (paired) FlexiprepReport.readSummaryPlot(outputDir, "QC_Reads_R2","R2", summaryPlotLinesR2)
FlexiprepReport.readSummaryPlot(outputDir, "QC_Reads_R1","R1", summaryPlotLinesR1.getOrElse(Seq("")))
if (paired) FlexiprepReport.readSummaryPlot(outputDir, "QC_Reads_R2","R2", summaryPlotLinesR2.getOrElse(Seq("")))
}#
<div class="panel-body">
<div class="row">
......
......@@ -16,12 +16,7 @@ package nl.lumc.sasc.biopet.pipelines.flexiprep
import java.io.{File, PrintWriter}
import nl.lumc.sasc.biopet.core.report.{
ReportBuilder,
ReportBuilderExtension,
ReportPage,
ReportSection
}
import nl.lumc.sasc.biopet.core.report.{ReportBuilder, ReportBuilderExtension, ReportPage, ReportSection}
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.utils.rscript.StackedBarPlot
import nl.lumc.sasc.biopet.utils.summary.db.Schema.{Library, Sample}
......@@ -29,6 +24,7 @@ import nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
import nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._
import nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._
import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
......@@ -288,11 +284,14 @@ object FlexiprepReadSummary {
val clipCount = settings.count(_._2.getOrElse("skip_clip", None).contains(false))
val librariesCount = libraries.size
val summaryPlotLinesR1 =
if (showPlot) FlexiprepReport.readSummaryPlotLines("R1", summary, sampleId = sampleId)
val summaryPlotlinesR2 =
val summaryPlotLinesR1: Some[Seq[String]] =
if (showPlot)
Some(FlexiprepReport.readSummaryPlotLines("R1", summary, sampleId = sampleId))
else None
val summaryPlotlinesR2: Some[Seq[String]] =
if (showPlot && paired)
FlexiprepReport.readSummaryPlotLines("R2", summary, sampleId = sampleId)
Some(FlexiprepReport.readSummaryPlotLines("R2", summary, sampleId = sampleId))
else None
val seqstatPaths = Map("num_total" -> List("reads", "num_total"))
val clippingPaths = Map(
......@@ -368,11 +367,14 @@ object FlexiprepBaseSummary {
.getOrElse("paired", None) == Some(true)
else settings.count(_._2.getOrElse("paired", None) == Some(true)) >= 1
val summaryPlotLinesR1 =
if (showPlot) FlexiprepReport.readSummaryPlotLines("R1", summary, sampleId = sampleId)
val summaryPlotlinesR2 =
val summaryPlotLinesR1: Some[Seq[String]] =
if (showPlot)
Some(FlexiprepReport.readSummaryPlotLines("R1", summary, sampleId = sampleId))
else None
val summaryPlotlinesR2: Some[Seq[String]] =
if (showPlot && paired)
FlexiprepReport.readSummaryPlotLines("R2", summary, sampleId = sampleId)
Some(FlexiprepReport.readSummaryPlotLines("R2", summary, sampleId = sampleId))
else None
val statsPaths = Map("num_total" -> List("bases", "num_total"))
......
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