Commit 746e99f1 authored by Joao Meidanis's avatar Joao Meidanis

fixing variables out of scope

parent 4223e56f
Pipeline #69260 failed with stages
in 31 seconds
......@@ -1468,11 +1468,15 @@ Segment.prototype = {
//### construct xdata and ydata for fitting
var f = {};
var r2 = {};
var x; // auxiliary variable
var y; // auxiliary variable
var lr; // auxiliary variable
for (var ufam in userFamPresent) {
var x = [];
var y = [];
for (var label in copies) {
x = [];
y = [];
for (label in copies) {
if (ufam === userFam[label]) {
x.push(spikeReads[label]);
y.push(copies[label]);
......@@ -1486,7 +1490,7 @@ Segment.prototype = {
}
//### fit curve
var lr = linearRegression(y, x);
lr = linearRegression(y, x);
f[ufam] = lr.slope;
r2[ufam] = lr.r2;
html += 'Coefficient estimation for family ' + ufam + ': ';
......
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