Commit c104d5ac authored by Mathieu Giraud's avatar Mathieu Giraud

js/{clone,segmenter}.js: display both raw and normalized reads on stats and export, when applicable

see #3650
parent e9ba8a2b
......@@ -637,7 +637,7 @@ Clone.prototype = {
reads = this.getReads(time)
if (this.normalized_reads && this.m.normalization_mode == this.m.NORM_EXTERNAL)
s += "[" + this.m.toStringThousands(reads) + " normalized]"
s += "[" + this.m.toStringThousands(Math.floor(reads * 100) / 100) + " normalized] "
if (reads < this.m.NB_READS_THRESHOLD_QUANTIFIABLE)
return s
......
......@@ -994,6 +994,7 @@ Segment.prototype = {
var list = this.m.getSelected()
var sumPercentage = 0;
var sumReads = 0;
var sumRawReads = 0;
var length = 0;
var lastActiveClone = 0;
......@@ -1004,14 +1005,18 @@ Segment.prototype = {
length += 1;
sumPercentage += this.m.clone(list[i]).getSize();
sumReads+= this.m.clone(list[i]).getReads();
sumRawReads+= this.m.clone(list[i]).getRawReads();
}
}
var t = ""
if (sumReads > 0) {
if (sumRawReads > 0) {
t += length + " clone" + (length>1 ? "s" : "") + ", "
t += this.m.toStringThousands(sumReads) + " read" + (sumReads>1 ? "s" : "")
t += this.m.toStringThousands(sumRawReads) + " read" + (sumRawReads>1 ? "s" : "")
if (sumRawReads != sumReads)
t += " [" + this.m.toStringThousands(Math.floor(sumReads*100)/100) + " norm.]"
percentageStr = this.m.getStrAnySize(this.m.t, sumPercentage)
if (percentageStr != "+")
......
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