Commit e2e3d2a5 authored by rhpvorderman's avatar rhpvorderman

Defuture flexiprepPage method

parent 1a7a8908
......@@ -51,15 +51,18 @@ object FlexiprepReport extends ReportBuilder {
override def pageArgs = Map("multisample" -> false)
/** Index page for a flexiprep report */
def indexPage: Future[ReportPage] = this.flexiprepPage(summary, sampleId.get, libId.get).map {
page =>
ReportPage(
Nil,
List(
"Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp")
) ::: page.sections,
Map())
}
def indexPage: Future[ReportPage] = {
val flexiprepPageSummaries = this.flexiprepPageSummaries(summary, sampleId.get, libId.get)
this.flexiprepPage(flexiprepPageSummaries).map {
page =>
ReportPage(
Nil,
List(
"Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp")
) ::: page.sections,
Map())
}}
/** Generate a QC report page for 1 single library, sampleId and libId must be defined in the arguments */
def flexiprepPageSummaries(summary: SummaryDb,
sampleId: Int,
libId: Int): Map[String, Map[String, Any]] = {
......@@ -81,7 +84,7 @@ object FlexiprepReport extends ReportBuilder {
"flexiprepBaseSummary" -> flexiprepBaseSummary
)
}
/** Generate a QC report page for 1 single library, sampleId and libId must be defined in the arguments */
def flexiprepPage(summaries: Map[String, Map[String, Any]]): Future[ReportPage] = {
val flexiprepBaseSummary = summaries("flexiprepBaseSummary")
val flexiprepReadSummary = summaries("flexiprepReadSummary")
......
......@@ -344,7 +344,10 @@ object GearsReport extends MultisampleReportBuilder {
Duration.Inf)
val flexiprepReportPage =
if (flexiprepExecuted) Some("QC" -> FlexiprepReport.flexiprepPage(summary, sampleId, libId))
if (flexiprepExecuted) {
val flexiprepPageSummaries = FlexiprepReport.flexiprepPageSummaries(summary,sampleId,libId)
Some("QC" -> FlexiprepReport.flexiprepPage(flexiprepPageSummaries))
}
else None
val centrifugePageAllMappingsKronaPlot = GearsKronaPlot.values(summary,
......
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