Commit bacd06a3 authored by Marc Duez's avatar Marc Duez
Browse files

model.js : time order use correct total_reads/segmented_reads

parent 82097af8
......@@ -482,12 +482,12 @@ Graph.prototype = {
var r=0;
if (this.m.norm==true)
r=1;
p.push([0, ( 1 - this.scale_x(res[0][r]*this.precision) ) ]);
p.push([0, ( 1 - this.scale_x(res[this.m.time_order[0]][r]*this.precision) ) ]);
for (var i=0; i< this.graph_col.length; i++){
p.push([( this.graph_col[i]), ( 1 - this.scale_x(res[this.m.time_order[i]][r]*this.precision))]);
}
p.push([1, ( 1 - this.scale_x(res[this.graph_col.length-1][r]*this.precision))]);
p.push([1, ( 1 - this.scale_x(res[this.m.time_order[this.graph_col.length-1]][r]*this.precision))]);
p.push([1, 1+0.1]);
return p;
......
......@@ -655,11 +655,12 @@ Model.prototype = {
result += this.getReads(cloneID, time)
var r=1;
var t=this.time_order[time]
if (this.norm){
r=this.normalization_factor[this.time_order[time]];
r=this.normalization_factor[t];
}
return (result/this.reads_segmented[time])*r;
return (result/this.reads_segmented[t])*r;
},//end getSize
......
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