Difference between revisions of "Template:Toronto/js/figures"

 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
// Interlab graph
 
var interlab = function() {
 
var negativeControl = {
 
x: [0, 2, 4, 6],
 
y: [-0.27, -0.04, -0.01, 0.00],
 
error_y: {
 
type: 'data',
 
array: [0.26, 0.01, 0.00, 0.00],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Negative Control',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var positiveControl = {
 
x: [0, 2, 4, 6],
 
y: [0.06, 0.49, 0.30, 0.27],
 
error_y: {
 
type: 'data',
 
array: [0.08, 0.05, 0.01, 0.01],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Positive Control',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice1 = {
 
x: [0, 2, 4, 6],
 
y: [0.23, 0.67, 0.40, 0.41],
 
error_y: {
 
type: 'data',
 
array: [0.18, 0.16, 0.02, 0.01],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 1',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice2 = {
 
x: [0, 2, 4, 6],
 
y: [0.37, 0.78, 0.49, 0.47],
 
error_y: {
 
type: 'data',
 
array: [0.16, 0.09, 0.03, 0.01],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 2',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice3 = {
 
x: [0, 2, 4, 6],
 
y: [-0.13, -0.01, 0.00, 0.01],
 
error_y: {
 
type: 'data',
 
array: [0.08, 0.01, 0.00, 0.00],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 3',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice4 = {
 
x: [0, 2, 4, 6],
 
y: [-0.04, 0.45, 0.38, 0.36],
 
error_y: {
 
type: 'data',
 
array: [0.18, 0.06, 0.02, 0.02],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 4',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice5 = {
 
x: [0, 2, 4, 6],
 
y: [-0.10, 0.23, 0.13, 0.12],
 
error_y: {
 
type: 'data',
 
array: [0.09, 0.02, 0.01, 0.00],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 5',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var testDevice6 = {
 
x: [0, 2, 4, 6],
 
y: [-0.12, -0.02, 0.00, 0.00],
 
error_y: {
 
type: 'data',
 
array: [0.05, 0.01, 0.00, 0.00],
 
visible: true
 
},
 
mode: 'lines+markers',
 
name: 'Test Device 6',
 
line: {shape: 'spline'},
 
type: 'scatter'
 
};
 
 
var data = [negativeControl, positiveControl, testDevice1, testDevice2, testDevice3, testDevice4, testDevice5, testDevice6];
 
 
var layout = {
 
title: 'iGEM Interlab Data 2017',
 
xaxis: {
 
title: 'Hour'
 
},
 
yaxis: {
 
title: 'uM Fluorescein / OD600'
 
}
 
};
 
 
Plotly.newPlot('interlab', data, layout);
 
}
 
 
 
  
 
// mcherry1
 
// mcherry1
Line 175: Line 45:
 
   Plotly.newPlot('mcherry1', data, layout);
 
   Plotly.newPlot('mcherry1', data, layout);
 
}
 
}
 
 
// results1
 
var results1 = function() {
 
var pdCas9_cI_mCherry = {
 
    x: [0, 1, 2, 3, 4, 5],
 
    y: [0.431455654, 0.486018799, 0.451166937, 0.412544754, 0.446801074, 0.431628187, 0.431110474],
 
    mode: 'lines+markers',
 
    name: 'pdCas9 + cI/mCherry',
 
    line: {shape: 'spline'},
 
    type: 'scatter'
 
  };
 
 
  var pdCas9_sgRNA = {
 
x: [0, 1, 2, 3, 4, 5],
 
y: [0.393061353, 0.461130378, 0.420842868, 0.367656727, 0.357478349, 0.301070788, 0.305702717],
 
    mode: 'lines+markers',
 
    name: 'pdCas9 + sgRNA',
 
    line: {shape: 'spline'},
 
    type: 'scatter'
 
  };
 
 
var pdCas9_sgRNA_AcrIIA4 = {
 
x: [0, 1, 2, 3, 4, 5],
 
y: [0.468340088,0.519079993,0.537926389,0.530572262,0.514394667,0.524926408, null],
 
    mode: 'lines+markers',
 
    name: 'pdCas9 + sgRNA + AcrIIA4',
 
    line: {shape: 'spline'},
 
    type: 'scatter'
 
  };
 
 
  var data = [pdCas9_cI_mCherry, pdCas9_sgRNA, pdCas9_sgRNA_AcrIIA4];
 
 
 
var layout = {
 
  title: 'MG1655 ∆lacI Growth Profile at 0.4 uM aTc',
 
  xaxis: {
 
    title: 'Timepoint(hours)'
 
  },
 
  yaxis: {
 
    title: 'Optical Density'
 
  }
 
};
 
 
  Plotly.newPlot('results1', data, layout);
 
}
 
 
 
interlab();
 

Latest revision as of 18:58, 13 December 2017

// mcherry1 var mcherry1 = function() { var lightControl = { x: [12, 13, 14, 15.5, 16.5, 17.5, 18.5, 20, 21, 22, 23, 24, 25], y: [129.83, 128.24, 138.79, 176.88, 230.48, 277.72, 327.33, 390.20, 425.82, 486.02, 597.98, 742.35, 960.72], error_y: { type: 'data', array: [8.81, 1.81, 11.44, 25.89, 88.77, 109.73, 130.10, 180.74, 204.12, 205.80, 239.24, 243.47, 183.55], visible: true }, mode: 'lines+markers', name: 'Light', line: {shape: 'spline'}, type: 'scatter' };

var darkControl = { x: [12, 13, 14, 15.5, 16.5, 17.5, 18.5, 20, 21, 22, 23, 24, 25], y: [115.16, 112.05, 114.44, 129.58, 132.22, 148.81, 152.93, 229.61, 254.06, 295.24, 351.34, 421.73, 565.07], error_y: { type: 'data', array: [4.64, 7.26, 2.53, 2.40, 14.22, 13.21, 33.95, 60.37, 61.98, 79.71, 94.47, 128.05, 156.18], visible: true }, mode: 'lines+markers', name: 'Dark', line: {shape: 'spline'}, type: 'scatter' };

var data = [lightControl, darkControl];


var layout = { title: 'Normalized Fluorescence over Time', xaxis: { title: 'Hours' }, yaxis: { title: 'RFU / OD600' } };

 Plotly.newPlot('mcherry1', data, layout);

}