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

Added centrifuge to report

parent 39647fd4
No related branches found
No related tags found
No related merge requests found
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
<%@ var libId: Option[String] = None %> <%@ var libId: Option[String] = None %>
<%@ var args: Map[String, Any] %> <%@ var args: Map[String, Any] %>
<%@ var outputDir: File %> <%@ var outputDir: File %>
<%@ var summaryTag: String = "krakenreport" %>
<% <%
val summaries = if (sampleId.isEmpty && libId.isEmpty) { val summaries = if (sampleId.isEmpty && libId.isEmpty) {
summary.getSampleValues("gearskraken", "stats", "krakenreport").map(x => x._1 -> x._2.get.asInstanceOf[Map[String, Any]]) summary.getSampleValues("gearskraken", "stats", summaryTag).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 } else summary.getValue(sampleId, libId, "gearskraken", "stats", summaryTag).map(sampleId.get -> _.asInstanceOf[Map[String, Any]]).toList.toMap
val tempFile = File.createTempFile("krona.", ".xml") val tempFile = File.createTempFile("krona.", ".xml")
tempFile.deleteOnExit() tempFile.deleteOnExit()
......
...@@ -44,7 +44,7 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip ...@@ -44,7 +44,7 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip
krakenReportJSON.output = new File(outputDir, s"$outputName.krkn.json") krakenReportJSON.output = new File(outputDir, s"$outputName.krkn.json")
krakenReportJSON.skipNames = config("skipNames", default = false) krakenReportJSON.skipNames = config("skipNames", default = false)
add(krakenReportJSON) add(krakenReportJSON)
addSummarizable(krakenReportJSON, "centrifugereport") addSummarizable(krakenReportJSON, "centrifuge_report")
addSummaryJobs() addSummaryJobs()
} }
......
...@@ -38,13 +38,17 @@ object GearsReport extends MultisampleReportBuilder { ...@@ -38,13 +38,17 @@ object GearsReport extends MultisampleReportBuilder {
def indexPage = { def indexPage = {
val krakenExecuted = summary.getSampleValues("gearskraken", "stats", "krakenreport").values.forall(_.isDefined) 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") val qiimeClosesOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_closed_otu_table", "path")
.map(x => new File(x.toString)) .map(x => new File(x.toString))
val qiimeOpenOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_open_otu_table", "path") val qiimeOpenOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_open_otu_table", "path")
.map(x => new File(x.toString)) .map(x => new File(x.toString))
ReportPage( 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" "Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)), Map())) )), Map()))
else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List( else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), 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