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