|
| 1 | +% This template shows how to perform a simple batch analysis of a set of conditions |
| 2 | +% Each color is analyzed independently |
| 3 | +TASBEConfig.checkpoint(TASBEConfig.checkpoints()); |
| 4 | + |
| 5 | +% load the color model |
| 6 | +load('../template_colormodel/CM120312.mat'); |
| 7 | +% can also add filters, such as gating out all "low transfection" red less than 10^6 MEFL: |
| 8 | +%CM = add_postfilter(CM,RangeFilter('PE-Tx-Red-YG-A',[1e6 inf])); |
| 9 | + |
| 10 | + |
| 11 | +% set up metadata |
| 12 | +experimentName = 'LacI Transfer Curve'; |
| 13 | + |
| 14 | +% Configure the analysis |
| 15 | +% Analyze on a histogram of 10^[first] to 10^[third] ERF, with bins every 10^[second] |
| 16 | +bins = BinSequence(4,0.1,10,'log_bins'); |
| 17 | + |
| 18 | +% Designate which channels have which roles |
| 19 | +AP = AnalysisParameters(bins,{}); |
| 20 | +% Ignore any bins with less than valid count as noise |
| 21 | +AP=setMinValidCount(AP,100'); |
| 22 | +% Ignore any raw fluorescence values less than this threshold as too contaminated by instrument noise |
| 23 | +AP=setPemDropThreshold(AP,5'); |
| 24 | +% Add autofluorescence back in after removing for compensation? |
| 25 | +AP=setUseAutoFluorescence(AP,false'); |
| 26 | +% By default, analysis tries to fit constitutive to transformed and non-transformed components |
| 27 | +% If your distribution is more complex or less complex, you can change the number of components |
| 28 | +% AP=setNumGaussianComponents(AP,3); |
| 29 | + |
| 30 | +% Make a map of condition names to file sets |
| 31 | +stem1011 = 'csv/LacI-CAGop_Dox'; |
| 32 | +root1011 = '_PointCloud.csv'; |
| 33 | +file_pairs = {... |
| 34 | + 'Dox 0.1', {[stem1011 '01' root1011]}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]} |
| 35 | + 'Dox 0.2', {[stem1011 '02' root1011]}; |
| 36 | + 'Dox 0.5', {[stem1011 '05' root1011]}; |
| 37 | + 'Dox 1.0', {[stem1011 '1' root1011]}; |
| 38 | + 'Dox 2.0', {[stem1011 '2' root1011]}; |
| 39 | + 'Dox 5.0', {[stem1011 '5' root1011]}; |
| 40 | + 'Dox 10.0', {[stem1011 '10' root1011]}; |
| 41 | + 'Dox 20.0', {[stem1011 '20' root1011]}; |
| 42 | + 'Dox 50.0', {[stem1011 '50' root1011]}; |
| 43 | + 'Dox 100.0', {[stem1011 '100' root1011]}; |
| 44 | + 'Dox 200.0', {[stem1011 '200' root1011]}; |
| 45 | + 'Dox 500.0', {[stem1011 '500' root1011]}; |
| 46 | + 'Dox 1000.0', {[stem1011 '1000' root1011]}; |
| 47 | + 'Dox 2000.0', {[stem1011 '2000' root1011]}; |
| 48 | + }; |
| 49 | + |
| 50 | +n_conditions = size(file_pairs,1); |
| 51 | + |
| 52 | +% Execute the actual analysis |
| 53 | +TASBEConfig.set('OutputSettings.StemName','LacI-CAGop'); |
| 54 | +TASBEConfig.set('OutputSettings.FixedInputAxis',[1e4 1e10]); |
| 55 | +% Set CSVReaderHeader (temporary feature) |
| 56 | +TASBEConfig.set('flow.defaultCSVReadHeader','csv/LacI-CAGop.json'); |
| 57 | +% Generate point cloud csv files |
| 58 | +%TASBEConfig.set('flow.outputPointCloud', true); |
| 59 | +[results, sampleresults] = per_color_constitutive_analysis(CM,file_pairs,{'EYFP','mKate', 'EBFP2'},AP); |
| 60 | + |
| 61 | +% Make output plots |
| 62 | +plot_batch_histograms(results,sampleresults,CM); % linespecs obtained from CM |
| 63 | +% can enter own linespecs for plot_batch_histograms: |
| 64 | +% plot_batch_histograms(results,sampleresults,CM,{'b','g','r'}); |
| 65 | + |
| 66 | +[statisticsFile, histogramFile] = serializeBatchOutput(file_pairs, CM, AP, sampleresults); |
| 67 | + |
| 68 | +save('LacI-CAGop-batch.mat','AP','bins','file_pairs','results','sampleresults'); |
0 commit comments