From 3c5e4e884ed9fc67145ef9d1424eb93a42221c8f Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Wed, 23 Dec 2015 20:01:41 +0100 Subject: [PATCH] Added a prettyXmlPrinter --- .../nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala b/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala index ba20fd2cc..3c5c0dee5 100644 --- a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala +++ b/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala @@ -11,7 +11,7 @@ import nl.lumc.sasc.biopet.utils.config.Configurable import org.broadinstitute.gatk.queue.QScript import scala.collection.mutable -import scala.xml.Node +import scala.xml.{PrettyPrinter, Node} /** * Created by pjvanthof on 04/12/15. @@ -141,7 +141,8 @@ object GearsKraken { </krona> val writer = new PrintWriter(outputFile) - writer.println(xml.copy(child = xml.child ++ createNodes(taxs)).toString()) + val prettyXml = new PrettyPrinter(80, 2) + writer.println(prettyXml.format(xml.copy(child = xml.child ++ createNodes(taxs)))) writer.close() } } \ No newline at end of file -- GitLab