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

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);
 
}
 
  
  

Revision as of 18:57, 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);

}


// 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], 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], 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], 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', range: [0, 1.5], autorange: false } };

Plotly.newPlot('results1', data, layout); }

// results2 var results2 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.42241975, 0.515455624, 0.576661944, 0.664565353, 0.813306988, 0.890564698] mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.400165237, 0.473048181, 0.526565832, 0.580779848, 0.640704276, 0.613198026], 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], 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', range: [0, 1.5], autorange: false } };

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

}


// results3 var results3 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.419086271, 0.518929382, 0.608628189, 0.759234146, 0.922562892, 1.036413806], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.398351209, 0.499043957, 0.594720753, 0.624802121, 0.660468132, 0.671495103], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.456333966, 0.53086805, 0.671138521, 0.826984583, 1.000156359, 1.143534583], 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', range: [0, 1.5], autorange: false } };

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

}


// results4 var results4 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.416618907, 0.515152665, 0.612156353, 0.758404066, 0.916987563, 0.966861139], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.420491935, 0.537194735, 0.65084616, 0.666125065, 0.703033484, 0.724947661], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.466054844, 0.538072598, 0.671138503, 0.822394943, 1.033440947, 1.15686506], 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', range: [0, 1.5], autorange: false } };

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

}


// results5 var results5 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.483158933, 0.570574303, 0.665645563, 0.775817024, 0.950739267, 1.040110697], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.391777945, 0.502298102, 0.614497747, 0.639206605, 0.655979528, 0.683853645], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.458984685, 0.536315673, 0.664565353, 0.824272227, 1.036009236, 1.179441082], 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', range: [0, 1.5], autorange: false } };

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

}


// results6 var results6 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.439003581, 0.540262053, 0.634440843, 0.743489127, 0.91454835, 1.029773548], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.458488511, 0.572656104, 0.680112333, 0.717246059, 0.74444477, 0.765631256], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.457329254, 0.53086805, 0.662037802, 0.810248919, 1.01718744, 1.167400175], 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', range: [0, 1.5], autorange: false } };

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

}


// results7 var results7 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.427127297, 0.547794997, 0.633180798, 0.75298228, 0.892759355, 1.019198437], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.400346364, 0.503996124, 0.602969037, 0.639581356, 0.645300289, 0.66648448], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.467035237, 0.535582185, 0.663723938, 0.807368739, 1.019336898, 1.149556184], 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', range: [0, 1.5], autorange: false } };

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

}


// results8 var results8 = function() { var pdCas9_cI_mCherry = { x: [0, 1, 2, 3, 4, 5], y: [0.458157508, 0.576110896, 0.675050421, 0.772778194, 0.92912647, 1.015936072], mode: 'lines+markers', name: 'pdCas9 + cI/mCherry', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA = { x: [0, 1, 2, 3, 4, 5], y: [0.444776036, 0.562038236, 0.669113955, 0.700766377, 0.728220311, 0.709787214], mode: 'lines+markers', name: 'pdCas9 + sgRNA', line: {shape: 'spline'}, type: 'scatter' };

var pdCas9_sgRNA_AcrIIA4 = { x: [0, 1, 2, 3, 4, 5], y: [0.464745334, 0.536755343, 0.650600685, 0.802345678, 0.989441615, 1.103383296], 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', range: [0, 1.5], autorange: false } };

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

}