Skip to content
Snippets Groups Projects
Commit e270ea9d authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added multisample krona plot

parent 38e13cdd
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,13 @@ object GearsReport extends MultisampleReportBuilder { ...@@ -20,8 +20,13 @@ object GearsReport extends MultisampleReportBuilder {
.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))
def indexPage = { def indexPage = {
val krakenExecuted = summary.getSampleValues("gearskraken", "stats", "krakenreport").values.forall(_.isDefined)
ReportPage( ReportPage(
List("Samples" -> generateSamplesPage(pageArgs)) ++ (if (krakenExecuted) List("Kraken" -> ReportPage(List(), List(
"Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)), Map()))
else Nil) ::: List("Samples" -> generateSamplesPage(pageArgs)) ++
Map( Map(
"Versions" -> ReportPage(List(), List( "Versions" -> ReportPage(List(), List(
"Executables" -> ReportSection("/nl/lumc/sasc/biopet/core/report/executables.ssp") "Executables" -> ReportSection("/nl/lumc/sasc/biopet/core/report/executables.ssp")
...@@ -41,7 +46,12 @@ object GearsReport extends MultisampleReportBuilder { ...@@ -41,7 +46,12 @@ object GearsReport extends MultisampleReportBuilder {
/** Single sample page */ /** Single sample page */
def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = { def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = {
ReportPage(List( val krakenExecuted = summary.getValue(Some(sampleId), None, "gearskraken", "stats", "krakenreport").isDefined
ReportPage((if (krakenExecuted) List("Kraken" -> ReportPage(List(), List(
"Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)), Map()))
else Nil) ::: List(
"Libraries" -> generateLibraryPage(args) "Libraries" -> generateLibraryPage(args)
), List("QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"), ), List("QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
"QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp") "QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp")
...@@ -53,7 +63,7 @@ object GearsReport extends MultisampleReportBuilder { ...@@ -53,7 +63,7 @@ object GearsReport extends MultisampleReportBuilder {
val krakenExecuted = summary.getValue(Some(sampleId), Some(libId), "gearskraken", "stats", "krakenreport").isDefined val krakenExecuted = summary.getValue(Some(sampleId), Some(libId), "gearskraken", "stats", "krakenreport").isDefined
ReportPage( ReportPage(
if (krakenExecuted) List("Gears - Metagenomics" -> ReportPage(List(), List( if (krakenExecuted) List("Kraken" -> ReportPage(List(), List(
"Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp" "Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)), Map())) )), Map()))
else Nil, List( else Nil, List(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment