Commit 9d27d507 authored by rhpvorderman's avatar rhpvorderman

Fix typo's

parent 9a7a81d7
...@@ -85,8 +85,7 @@ ...@@ -85,8 +85,7 @@
#for (field <- fields) #for (field <- fields)
<td>${results(field)}</td> <td>${results(field)}</td>
#end #end
#end </tr>
</tr>
#end #end
#end #end
</tbody> </tbody>
......
...@@ -50,7 +50,7 @@ object MappingReport extends ReportBuilder { ...@@ -50,7 +50,7 @@ object MappingReport extends ReportBuilder {
.map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x)) .map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
/** Root page for single BamMetrcis report */ /** Root page for single BamMetrcis report */
def indexPage: Future[ReportPage] = Future { def indexPage: Future[ReportPage] = {
val mappingSettings = summary.getSettingKeys( val mappingSettings = summary.getSettingKeys(
runId, runId,
"mapping", "mapping",
...@@ -61,13 +61,16 @@ object MappingReport extends ReportBuilder { ...@@ -61,13 +61,16 @@ object MappingReport extends ReportBuilder {
Map("skip_flexiprep" -> List("skip_flexiprep"), "skip_metrics" -> List("skip_metrics")) Map("skip_flexiprep" -> List("skip_flexiprep"), "skip_metrics" -> List("skip_metrics"))
) )
val skipFlexiprep = mappingSettings.get("skip_flexiprep").flatten.getOrElse(false) == true val skipFlexiprep = mappingSettings.get("skip_flexiprep").flatten.getOrElse(false) == true
val bamMetricsPageValues = BammetricsReport.bamMetricsPageValues(summary,sampleId,libId)
val flexiprepReportPageValues = FlexiprepReport.flexiprepPageSummaries(summary, sampleId.get, libId.get)
val bamMetricsPage = val bamMetricsPage =
if (mappingSettings.get("skip_metrics").flatten.getOrElse(false) == false) { if (mappingSettings.get("skip_metrics").flatten.getOrElse(false) == false) {
Some(BammetricsReport.bamMetricsPage(summary, sampleId, libId)) Some(BammetricsReport.bamMetricsPage(bamMetricsPageValues))
} else None } else None
ReportPage( Future {
ReportPage(
(if (skipFlexiprep) Nil (if (skipFlexiprep) Nil
else List("QC" -> FlexiprepReport.flexiprepPage(summary, sampleId.get, libId.get))) ::: else List("QC" -> FlexiprepReport.flexiprepPage(flexiprepReportPageValues))) :::
bamMetricsPage.map(_.subPages).getOrElse(Nil), bamMetricsPage.map(_.subPages).getOrElse(Nil),
List( List(
"Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp") "Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp")
...@@ -76,3 +79,4 @@ object MappingReport extends ReportBuilder { ...@@ -76,3 +79,4 @@ object MappingReport extends ReportBuilder {
) )
} }
} }
}
...@@ -283,61 +283,61 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder { ...@@ -283,61 +283,61 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
/** Single sample page */ /** Single sample page */
def samplePage(sampleId: Int, args: Map[String, Any]): Future[ReportPage] = { def samplePage(sampleId: Int, args: Map[String, Any]): Future[ReportPage] = {
val krakenExecuted = Await.result(summary.getStatsSize(runId, val krakenExecuted = Await.result(summary.getStatsSize(runId,
"gearskraken", "gearskraken",
"krakenreport", "krakenreport",
library = NoLibrary, library = NoLibrary,
sample = sampleId), sample = sampleId),
Duration.Inf) >= 1 Duration.Inf) >= 1
val centrifugeExecuted = Await.result(summary.getStatsSize(runId, val centrifugeExecuted = Await.result(summary.getStatsSize(runId,
"gearscentrifuge", "gearscentrifuge",
"centrifuge_report", "centrifuge_report",
library = NoLibrary, library = NoLibrary,
sample = sampleId, sample = sampleId,
mustHaveSample = true), mustHaveSample = true),
Duration.Inf) >= 1 Duration.Inf) >= 1
val flexiprepExecuted = Await.result( val flexiprepExecuted = Await.result(
summary.getStatsSize(runId, "flexiprep", sample = sampleId, mustHaveLibrary = true), summary.getStatsSize(runId, "flexiprep", sample = sampleId, mustHaveLibrary = true),
Duration.Inf) >= 1 Duration.Inf) >= 1
val centrifugeAllMappingsReportValues = GearsKronaPlot.values(summary, val centrifugeAllMappingsReportValues = GearsKronaPlot.values(summary,
runId, runId,
"gearscentrifuge", "gearscentrifuge",
"centrifuge_report", "centrifuge_report",
samples, samples,
libraries, libraries,
sampleId, sampleId,
libId, libId,
Some("centrifuge")) Some("centrifuge"))
val centrifugeUniqueMappingsReportValues = GearsKronaPlot.values(summary, val centrifugeUniqueMappingsReportValues = GearsKronaPlot.values(summary,
runId, runId,
"gearscentrifuge", "gearscentrifuge",
"centrifuge_unique_report", "centrifuge_unique_report",
samples, samples,
libraries, libraries,
sampleId, sampleId,
libId) libId)
val dustbinAnalysisReportValues = GearsKronaPlot.values(summary, val dustbinAnalysisReportValues = GearsKronaPlot.values(summary,
runId, runId,
"gearskraken", "gearskraken",
"krakenreport", "krakenreport",
samples, samples,
libraries, libraries,
sampleId, sampleId,
libId) libId)
val alignmentSummaryReportValues = BammetricsReportPage.alignmentSummaryValues(summary, val alignmentSummaryReportValues = BammetricsReportPage.alignmentSummaryValues(summary,
runId, runId,
samples, samples,
libraries, libraries,
sampleId, sampleId,
libId, libId,
showPlot = true) showPlot = true)
val preprocessingReportValues = BammetricsReportPage.alignmentSummaryValues(summary, val preprocessingReportValues = BammetricsReportPage.alignmentSummaryValues(summary,
runId, runId,
samples, samples,
libraries, libraries,
sampleId, sampleId,
libId, libId,
sampleLevel = true) sampleLevel = true)
val flexiprepReadSummary = val flexiprepReadSummary =
FlexiprepReadSummary.values(summary, runId, samples, libraries, sampleId, libId) FlexiprepReadSummary.values(summary, runId, samples, libraries, sampleId, libId)
val flexiprepBaseSummary = val flexiprepBaseSummary =
...@@ -348,34 +348,34 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder { ...@@ -348,34 +348,34 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
Future { Future {
ReportPage( ReportPage(
List("Libraries" -> generateLibraryPage(args), List("Libraries" -> generateLibraryPage(args),
"Alignment" -> BammetricsReport.bamMetricsPage(bamMetricsReportValues)) ++ "Alignment" -> BammetricsReport.bamMetricsPage(bamMetricsReportValues)) ++
(if (centrifugeExecuted) (if (centrifugeExecuted)
List( List(
"Centrifuge analysis" -> Future.successful(ReportPage( "Centrifuge analysis" -> Future.successful(ReportPage(
List( List(
"Non-unique" -> Future.successful( "Non-unique" -> Future.successful(
ReportPage( ReportPage(
List(), List(),
List("All mappings" -> ReportSection( List("All mappings" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", "/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp",
centrifugeAllMappingsReportValues)), centrifugeAllMappingsReportValues)),
Map() Map()
))), ))),
List("Unique mappings" -> ReportSection( List("Unique mappings" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", "/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp",
centrifugeUniqueMappingsReportValues)), centrifugeUniqueMappingsReportValues)),
Map("summaryPipelineName" -> "gearscentrifuge") Map("summaryPipelineName" -> "gearscentrifuge")
))) )))
else else
Nil) ::: (if (krakenExecuted) Nil) ::: (if (krakenExecuted)
List( List(
"Dustbin analysis" -> Future.successful( "Dustbin analysis" -> Future.successful(
ReportPage(List(), ReportPage(List(),
List("Krona Plot" -> ReportSection( List("Krona Plot" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", "/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp",
dustbinAnalysisReportValues)), dustbinAnalysisReportValues)),
Map()))) Map())))
else Nil), else Nil),
List( List(
"Alignment" -> ReportSection( "Alignment" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp", "/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp",
...@@ -385,18 +385,19 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder { ...@@ -385,18 +385,19 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
preprocessingReportValues) preprocessingReportValues)
) ++ ) ++
(if (flexiprepExecuted) (if (flexiprepExecuted)
List( List(
"QC reads" -> ReportSection( "QC reads" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp", "/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp",
flexiprepReadSummary), flexiprepReadSummary),
"QC bases" -> ReportSection( "QC bases" -> ReportSection(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp", "/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp",
flexiprepBaseSummary) flexiprepBaseSummary)
) )
else Nil), else Nil),
args args
) )
} }
}
/** Library page */ /** Library page */
def libraryPage(sampleId: Int, libId: Int, args: Map[String, Any]): Future[ReportPage] = { def libraryPage(sampleId: Int, libId: Int, args: Map[String, Any]): Future[ReportPage] = {
...@@ -517,4 +518,4 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder { ...@@ -517,4 +518,4 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
} }
} }
} }
}
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