From c80120214c67a1619ae8d0faacd674df124f33c4 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Fri, 25 Dec 2015 14:36:59 +0100
Subject: [PATCH] Added template for biom to krona

---
 .../biopet/pipelines/gears/qiimeKrona.ssp     | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp

diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp b/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp
new file mode 100644
index 000000000..39166ca0d
--- /dev/null
+++ b/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp
@@ -0,0 +1,24 @@
+#import(nl.lumc.sasc.biopet.core.report.ReportBuilder)
+#import(nl.lumc.sasc.biopet.pipelines.gears.GearsQiimeClosed)
+#import(java.io.File)
+#import(java.io.PrintWriter)
+<%@ var biomFile: File %>
+<%@ var args: Map[String, Any] %>
+<%@ var outputDir: File %>
+
+<%
+    val tempFile = File.createTempFile("krona.", ".xml")
+    tempFile.deleteOnExit()
+    GearsQiimeClosed.qiimeBiomToKrona(biomFile, tempFile)
+
+    val output = ReportBuilder.renderTemplate("/nl/lumc/sasc/biopet/core/report/krona.ssp",
+    args ++ Map("kronaXml" -> tempFile))
+
+
+    val file = new File(outputDir, "kraken_krona.html")
+    val writer = new PrintWriter(file)
+    writer.println(output)
+    writer.close()
+%>
+
+<iframe src="kraken_krona.html" style="width:100%;height:80vh;border:none;"></iframe>
-- 
GitLab