Commit 6f77b5f3 authored by Peter van 't Hof's avatar Peter van 't Hof

Adding clipping and trimming stats

parent 776769bf
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<th>Sample</th> <th>Sample</th>
<th colspan="2">Library</th> <th colspan="2">Library</th>
<th>Before QC</th> <th>Before QC</th>
<th colspan="2">Discarded</th> <th>Discarded</th>
<th>(%)</th>
<th>After QC</th> <th>After QC</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
...@@ -38,7 +39,6 @@ ...@@ -38,7 +39,6 @@
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }# #{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads) #for (read <- reads)
#if (read == "R2") </tr><tr> #end #if (read == "R2") </tr><tr> #end
#{ #{
val beforeTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read, "bases", "num_total").getOrElse(0).asInstanceOf[Long] val beforeTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read, "bases", "num_total").getOrElse(0).asInstanceOf[Long]
val afterTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read + "_after", "bases", "num_total").getOrElse(0).asInstanceOf[Long] val afterTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read + "_after", "bases", "num_total").getOrElse(0).asInstanceOf[Long]
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<th>Sample</th> <th>Sample</th>
<th colspan="2">Library</th> <th colspan="2">Library</th>
<th>Before QC</th> <th>Before QC</th>
<th>Clipping</th>
<th>Trimming</th>
<th>After QC</th> <th>After QC</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
...@@ -23,7 +25,6 @@ ...@@ -23,7 +25,6 @@
case Some(libId) => List(libId.toString) case Some(libId) => List(libId.toString)
case _ => summary.libraries(sample).toList case _ => summary.libraries(sample).toList
} }
val sampleRowspan = { val sampleRowspan = {
libs.size + libs.size +
libs.count(summary.getLibraryValue(sample, _, "flexiprep", "settings", "paired").getOrElse(false) == true) libs.count(summary.getLibraryValue(sample, _, "flexiprep", "settings", "paired").getOrElse(false) == true)
...@@ -37,10 +38,18 @@ ...@@ -37,10 +38,18 @@
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }# #{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads) #for (read <- reads)
#if (read == "R2") </tr><tr> #end #if (read == "R2") </tr><tr> #end
#{
val beforeTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read, "reads", "num_total")
val afterTotal = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read + "_after", "reads", "num_total")
val clippingDiscardedToShort = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "clipping_" + read, "num_reads_discarded_too_short").getOrElse(0).asInstanceOf[Long]
val clippingDiscardedToLong = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "clipping_" + read, "num_reads_discarded_too_long").getOrElse(0).asInstanceOf[Long]
val trimmingDiscarded = summary.getLibraryValue(sample, libId, "flexiprep", "stats", "trimming", "num_reads_discarded_" + read).getOrElse(0).asInstanceOf[Long]
}#
<td>${read}</td> <td>${read}</td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read, "reads", "num_total")} <td>${beforeTotal}</td>
</td> <td>${clippingDiscardedToShort + clippingDiscardedToLong}</td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_" + read + "_after", "reads", "num_total")}</td> <td>${trimmingDiscarded}</td>
<td>${afterTotal}</td>
#end #end
</tr> </tr>
#end #end
......
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