Commit 3425ce2f authored by Peter van 't Hof's avatar Peter van 't Hof

Correct mapping precentage for secondary reads

parent cb93552e
......@@ -63,6 +63,7 @@
#if (!sampleLevel) <th>Library</th> #end
<th>Total</th>
<th>Mapped</th>
<th>Secondary</th>
<th>(%)</th>
<th>Duplicates</th>
<th>(%)</th>
......@@ -85,10 +86,12 @@
val total = summary.getValue((prefixPath ::: List("biopet_flagstat", "All")):_*).getOrElse(0L).asInstanceOf[Long]
val mapped = summary.getValue((prefixPath ::: List("biopet_flagstat", "Mapped")):_*).getOrElse(0L).asInstanceOf[Long]
val duplicates = summary.getValue((prefixPath ::: List("biopet_flagstat", "Duplicates")):_*).getOrElse(0L).asInstanceOf[Long]
val secondary = summary.getValue((prefixPath ::: List("biopet_flagstat", "NotPrimaryAlignment")):_*).getOrElse(0L).asInstanceOf[Long]
}#
<td>${total}</td>
<td>${mapped}</td>
<td>${mapped.toDouble / total * 100}%</td>
<td>${secondary}</td>
<td>${(mapped - secondary).toDouble / (total - secondary) * 100}%</td>
<td>${duplicates}</td>
<td>${duplicates.toDouble / total * 100}%</td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment