Commit f7c21823 authored by rhpvorderman's avatar rhpvorderman

Defutured bammetricsPage

parent c8521fb6
...@@ -50,15 +50,16 @@ object BammetricsReport extends ReportBuilder { ...@@ -50,15 +50,16 @@ object BammetricsReport extends ReportBuilder {
def pipelineName = "bammetrics" def pipelineName = "bammetrics"
/** Root page for single BamMetrcis report */ /** Root page for single BamMetrcis report */
def indexPage: Future[ReportPage] = def indexPage: Future[ReportPage] ={
bamMetricsPage(summary, sampleId, libId).map { bamMetricsPage => val bamMetricsValues: (Map[String, Boolean], Map[String, List[String]], Map[String, List[(String, Map[String, Any])]], Map[String, Map[String, Any]], String) = bamMetricsPageValues(summary, sampleId, libId)
bamMetricsPage(bamMetricsValues).map { bamMetricsPage =>
ReportPage( ReportPage(
bamMetricsPage.subPages ::: List( bamMetricsPage.subPages ::: List(
"Versions" -> Future( "Versions" -> Future(
ReportPage(List(), ReportPage(List(),
List("Executables" -> ReportSection( List("Executables" -> ReportSection(
"/nl/lumc/sasc/biopet/core/report/executables.ssp")), "/nl/lumc/sasc/biopet/core/report/executables.ssp")),
Map())), Map())),
"Files" -> filesPage(sampleId, libId) "Files" -> filesPage(sampleId, libId)
), ),
List( List(
...@@ -68,12 +69,13 @@ object BammetricsReport extends ReportBuilder { ...@@ -68,12 +69,13 @@ object BammetricsReport extends ReportBuilder {
Map() Map()
) )
} }
}
/** Generates values for bamMetricsPage */ /** Generates values for bamMetricsPage */
def bamMetricsPageValues(summary: SummaryDb, def bamMetricsPageValues(summary: SummaryDb,
sampleId: Option[Int], sampleId: Option[Int],
libId: Option[Int], libId: Option[Int],
metricsTag: String = "bammetrics"): (Map[String, Boolean], Map[String, List[String]], Map[String, List[(String, Map[String, Any])]], Map[String, Map[String, Any]]) = { metricsTag: String = "bammetrics"): (Map[String, Boolean], Map[String, List[String]], Map[String, List[(String, Map[String, Any])]], Map[String, Map[String, Any]], String) = {
val wgsExecuted = summary.getStatsSize(runId, val wgsExecuted = summary.getStatsSize(runId,
metricsTag, metricsTag,
"wgs", "wgs",
......
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