diff --git a/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp index 8ef51a20f1c6332294654343015c0d03acd0d50b..bc3a405a7fdc8e0fce434deed3a68590f01a2fc7 100644 --- a/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp +++ b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp @@ -10,11 +10,12 @@ <%@ var libId: Option[String] = None %> <%@ var args: Map[String, Any] %> <%@ var outputDir: File %> +<%@ var summaryTag: String = "krakenreport" %> <% val summaries = if (sampleId.isEmpty && libId.isEmpty) { - summary.getSampleValues("gearskraken", "stats", "krakenreport").map(x => x._1 -> x._2.get.asInstanceOf[Map[String, Any]]) - } else summary.getValue(sampleId, libId, "gearskraken", "stats", "krakenreport").map(sampleId.get -> _.asInstanceOf[Map[String, Any]]).toList.toMap + summary.getSampleValues("gearskraken", "stats", summaryTag).map(x => x._1 -> x._2.get.asInstanceOf[Map[String, Any]]) + } else summary.getValue(sampleId, libId, "gearskraken", "stats", summaryTag).map(sampleId.get -> _.asInstanceOf[Map[String, Any]]).toList.toMap val tempFile = File.createTempFile("krona.", ".xml") tempFile.deleteOnExit() diff --git a/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala index 0f0a04d8d7cd129cccf90d3f31ceab09f3ac30e7..45ecf3e60d80d082ad93e3edde8391cbc49bb50c 100644 --- a/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala +++ b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala @@ -44,7 +44,7 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip krakenReportJSON.output = new File(outputDir, s"$outputName.krkn.json") krakenReportJSON.skipNames = config("skipNames", default = false) add(krakenReportJSON) - addSummarizable(krakenReportJSON, "centrifugereport") + addSummarizable(krakenReportJSON, "centrifuge_report") addSummaryJobs() } 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 d28668c484e60ce3aaf781fb974fffd16651477e..e624a44e67ef3616919614c3a3431d54ccb3a10f 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 @@ -38,13 +38,17 @@ object GearsReport extends MultisampleReportBuilder { def indexPage = { val krakenExecuted = summary.getSampleValues("gearskraken", "stats", "krakenreport").values.forall(_.isDefined) + val centrifugeExecuted = summary.getSampleValues("gearskraken", "stats", "centrifuge_report").values.forall(_.isDefined) val qiimeClosesOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_closed_otu_table", "path") .map(x => new File(x.toString)) val qiimeOpenOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_open_otu_table", "path") .map(x => new File(x.toString)) ReportPage( - (if (krakenExecuted) List("Kraken analysis" -> ReportPage(List(), List( + (if (centrifugeExecuted) List("Centriguge analysis" -> ReportPage(List(), List( + "Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp" + )), Map("summaryTag" -> "centriguge_report"))) + else Nil) ::: (if (krakenExecuted) List("Kraken analysis" -> ReportPage(List(), List( "Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp" )), Map())) else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List(