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

Added unclasified reads

parent 05bcfc19
No related branches found
No related tags found
No related merge requests found
......@@ -124,9 +124,16 @@ object GearsKraken {
case (k, v) =>
val node = <node name={ k }></node>
val sizes = samples.map { sample =>
<val>
{ getValue(sample, (path ::: k :: Nil).tail, "size").getOrElse(0) }
</val>
if (k == "root") {
val unclassified = summaries(sample)("unclassified").asInstanceOf[Map[String, Any]]("size").asInstanceOf[Long]
<val>
{getValue(sample, (path ::: k :: Nil).tail, "size").getOrElse(0).toString.toLong + unclassified}
</val>
} else {
<val>
{getValue(sample, (path ::: k :: Nil).tail, "size").getOrElse(0)}
</val>
}
}
val size = <size>{ sizes }</size>
node.copy(child = size ++ createNodes(v.asInstanceOf[mutable.Map[String, Any]], path ::: k :: Nil))
......
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