Commit b05894a6 authored by rhpvorderman's avatar rhpvorderman

Added some option values to save calculation time

parent 0008b0d3
...@@ -58,7 +58,10 @@ object BammetricsReportPage { ...@@ -58,7 +58,10 @@ object BammetricsReportPage {
case Some(id) => allSamples.filter(_.id == id).toList case Some(id) => allSamples.filter(_.id == id).toList
case _ => allSamples.toList case _ => allSamples.toList
} }
val mapQualityPlotTables = mappingQualityPlotTables(summary, !sampleLevel, sampleId, libId) val mapQualityPlotTables: Option[Array[Map[String, Array[Any]]]] =
if (showPlot)
Some(mappingQualityPlotTables(summary, !sampleLevel, sampleId, libId))
else None
val statsPaths = fields.map(x => x -> List("mapping_quality", "general", x)).toMap val statsPaths = fields.map(x => x -> List("mapping_quality", "general", x)).toMap
val mappingQualityTableResults: Map[(Int, Int), Map[String, Option[Any]]] = val mappingQualityTableResults: Map[(Int, Int), Map[String, Option[Any]]] =
...@@ -90,7 +93,11 @@ object BammetricsReportPage { ...@@ -90,7 +93,11 @@ object BammetricsReportPage {
case Some(id) => allSamples.filter(_.id == id).toList case Some(id) => allSamples.filter(_.id == id).toList
case _ => allSamples.toList case _ => allSamples.toList
} }
val clippingPlotTables = BammetricsReport.clippingPlotTables(summary,!sampleLevel, sampleId, libId) val clippingPlotTables: Option[Array[Map[String, Array[Any]]]] =
if (showPlot)
Some(BammetricsReport.clippingPlotTables(summary,!sampleLevel, sampleId, libId))
else None
val statsPaths = fields.map(x => x -> List("clipping", "general", x)).toMap val statsPaths = fields.map(x => x -> List("clipping", "general", x)).toMap
val clippingTableResults = summary.getStatsForLibraries(runId, "bammetrics", "bamstats",sampleId, statsPaths) val clippingTableResults = summary.getStatsForLibraries(runId, "bammetrics", "bamstats",sampleId, statsPaths)
Map( Map(
......
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