From e74374823b61ed1f46cc6b6fbcb0101fff1172b3 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof Date: Tue, 20 Sep 2016 18:43:41 +0200 Subject: [PATCH] Added sample and library plots --- .../biopet/pipelines/gears/GearsReport.scala | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala index 9a8047427..0a2950082 100644 --- a/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala +++ b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala @@ -81,12 +81,19 @@ object GearsReport extends MultisampleReportBuilder { /** Single sample page */ def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = { val krakenExecuted = summary.getValue(Some(sampleId), None, "gearskraken", "stats", "krakenreport").isDefined + val centrifugeExecuted = summary.getValue(Some(sampleId), None, "gearscentrifuge", "stats", "centrifuge_report").isDefined val qiimeClosesOtuTable = summary.getValue(Some(sampleId), None, "gearsqiimeclosed", "files", "pipeline", "otu_table", "path") .map(x => new File(x.toString)) val qiimeOpenOtuTable = summary.getValue(Some(sampleId), None, "gearsqiimeopen", "files", "pipeline", "otu_table", "path") .map(x => new File(x.toString)) - ReportPage((if (krakenExecuted) List("Kraken" -> ReportPage(List(), List( + ReportPage((if (centrifugeExecuted) List("Centriguge analysis" -> ReportPage(List("Non-unique" -> ReportPage(List(), List("All mappings" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", + Map("summaryStatsTag" -> "centrifuge_report") + )), Map())), List( + "Unique mappings" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", + Map("summaryStatsTag" -> "centrifuge_unique_report") + )), Map("summaryModuleTag" -> "gearscentrifuge"))) + else Nil) ::: (if (krakenExecuted) List("Kraken" -> ReportPage(List(), List( "Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp" )), Map())) else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List( @@ -106,6 +113,7 @@ object GearsReport extends MultisampleReportBuilder { def libraryPage(sampleId: String, libId: String, args: Map[String, Any]): ReportPage = { val flexiprepExecuted = summary.getLibraryValue(sampleId, libId, "flexiprep").isDefined val krakenExecuted = summary.getValue(Some(sampleId), Some(libId), "gearskraken", "stats", "krakenreport").isDefined + val centrifugeExecuted = summary.getValue(Some(sampleId), Some(libId), "gearscentrifuge", "stats", "centrifuge_report").isDefined val qiimeClosesOtuTable = summary.getValue(Some(sampleId), Some(libId), "gearsqiimeclosed", "files", "pipeline", "otu_table", "path") .map(x => new File(x.toString)) val qiimeOpenOtuTable = summary.getValue(Some(sampleId), Some(libId), "gearsqiimeopen", "files", "pipeline", "otu_table", "path") @@ -113,7 +121,13 @@ object GearsReport extends MultisampleReportBuilder { ReportPage( (if (flexiprepExecuted) List("QC" -> FlexiprepReport.flexiprepPage) else Nil - ) ::: (if (krakenExecuted) List("Kraken" -> ReportPage(List(), List( + ) ::: (if (centrifugeExecuted) List("Centriguge analysis" -> ReportPage(List("Non-unique" -> ReportPage(List(), List("All mappings" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", + Map("summaryStatsTag" -> "centrifuge_report") + )), Map())), List( + "Unique mappings" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp", + Map("summaryStatsTag" -> "centrifuge_unique_report") + )), Map("summaryModuleTag" -> "gearscentrifuge"))) + else Nil) ::: (if (krakenExecuted) List("Kraken" -> ReportPage(List(), List( "Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp" )), Map())) else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List( -- GitLab