Skip to content

Commit 65ef088

Browse files
author
coverney
committed
Merge branch 'master' into coverney.issue421
2 parents e455040 + bed0df7 commit 65ef088

File tree

10 files changed

+102
-90
lines changed

10 files changed

+102
-90
lines changed

01_flow_cytometry/exercises.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
% Examples of flow data (Fig1 to Fig4)
1616
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1717
% pure scatter - often hard to interpret
18-
fcs_scatter([dosedata 'LacI-CAGop_C4_P3.fcs'],'PE-Tx-Red-YG-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig1
19-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig2
18+
fcs_scatter(DataFile('fcs', [dosedata 'LacI-CAGop_C4_P3.fcs']),'PE-Tx-Red-YG-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig1
19+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig2
2020
% smoothed density plot omits details but often summarizes collective better
21-
data1 = fcs_scatter([dosedata 'LacI-CAGop_C4_P3.fcs'],'PE-Tx-Red-YG-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig3
22-
data2 = fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig4
21+
data1 = fcs_scatter(DataFile('fcs', [dosedata 'LacI-CAGop_C4_P3.fcs']),'PE-Tx-Red-YG-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig3
22+
data2 = fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig4
2323

2424
% Things to notice:
2525
% - look at the size of data1 and data2: there's a *LOT* of points in these samples
@@ -91,10 +91,10 @@
9191

9292
CM = ColorModel('','',channels,colorfiles,{}); % simplified ColorModel, more features will be introduced in future tutorials
9393

94-
filtered = read_filtered_au(CM,[colordata '07-29-11_EYFP_P3.fcs']); % applies any filters set in ColorModel
94+
filtered = read_filtered_au(CM,DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs'])); % applies any filters set in ColorModel
9595

9696
CM = set_dequantization(CM,true); % dequantization adds noise to spread the data out more, especially useful at low levels
97-
[dequantized hdr] = read_filtered_au(CM,[dosedata 'LacI-CAGop_C4_P3.fcs']);
97+
[dequantized hdr] = read_filtered_au(CM,DataFile('fcs', [dosedata 'LacI-CAGop_C4_P3.fcs']));
9898
xc = dequantized(:,10); yc = dequantized(:,11);
9999
pos = xc>0 & yc>0;
100100
figure; smoothhist2D(log10([xc(pos) yc(pos)]),10,[200, 200],[],'image',[0 0; 6 6]); % Fig5

02_flow_compensation/exercises.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1717
% Let's look at some single-color positive controls:
1818
% no significant spectral overlap
19-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig1
19+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig1
2020
% minor spectral overlap
21-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','PE-TxRed YG-A',1,[0 0; 6 6],1); % Fig2
21+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','PE-TxRed YG-A',1,[0 0; 6 6],1); % Fig2
2222
% significant spectral overlap
23-
fcs_scatter([colordata '07-29-11_mkate_P3.fcs'],'PE-TxRed YG-A','FITC-A',1,[0 0; 6 6],1); % Fig3
24-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','AmCyan-A',1,[0 0; 6 6],1); % Fig4
23+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_mkate_P3.fcs']),'PE-TxRed YG-A','FITC-A',1,[0 0; 6 6],1); % Fig3
24+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','AmCyan-A',1,[0 0; 6 6],1); % Fig4
2525
% massive spectral overlap
26-
fcs_scatter([colordata '07-29-11_EBFP2_P3.fcs'],'Pacific Blue-A','AmCyan-A',1,[0 0; 6 6],1); % Fig5
26+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EBFP2_P3.fcs']),'Pacific Blue-A','AmCyan-A',1,[0 0; 6 6],1); % Fig5
2727

2828
% let's look at some of these without blending (plot 'density' set to 0):
29-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','PE-TxRed YG-A',0,[0 0; 6 6],1); % Fig6
30-
fcs_scatter([colordata '07-29-11_EYFP_P3.fcs'],'FITC-A','AmCyan-A',0,[0 0; 6 6],1); % Fig7
31-
fcs_scatter([colordata '07-29-11_EBFP2_P3.fcs'],'Pacific Blue-A','AmCyan-A',0,[0 0; 6 6],1); % Fig8
29+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','PE-TxRed YG-A',0,[0 0; 6 6],1); % Fig6
30+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EYFP_P3.fcs']),'FITC-A','AmCyan-A',0,[0 0; 6 6],1); % Fig7
31+
fcs_scatter(DataFile('fcs', [colordata '07-29-11_EBFP2_P3.fcs']),'Pacific Blue-A','AmCyan-A',0,[0 0; 6 6],1); % Fig8
3232
% notice that these are extremely tight compared to a two-color experiment:
33-
fcs_scatter([colordata '2012-03-12_EBFP2_EYFP_P3.fcs'],'Pacific Blue-A','FITC-A',0,[0 0; 6 6],1); % Fig9
33+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_EBFP2_EYFP_P3.fcs']),'Pacific Blue-A','FITC-A',0,[0 0; 6 6],1); % Fig9
3434

3535
% What does autofluorescence look like?
3636
[raw hdr data] = fca_readfcs([colordata '07-29-11_blank_P3.fcs']);
@@ -42,8 +42,8 @@
4242
% of autofluorescence and instrument error. There is not currently any elegant way of separating these.
4343

4444
% fit to a gaussian model:
45-
mu = mean(data(:,10))
46-
sigma = std(data(:,10))
45+
mu = mean(data(:,10));
46+
sigma = std(data(:,10));
4747

4848
% Notice that the fit to a gaussian is pretty good:
4949
range = -100:5:150;
@@ -115,7 +115,7 @@
115115
CM = set_ERF_channel_name(CM, 'FITC-A'); % We'll explain this in the next exercise
116116

117117
% Now let's read some files...
118-
raw = read_filtered_au(CM,[dosedata 'LacI-CAGop_C3_P3.fcs']);
118+
raw = read_filtered_au(CM,DataFile('fcs', [dosedata 'LacI-CAGop_C3_P3.fcs']));
119119
% compensated = readfcs_compensated_au(CM,[dosedata 'LacI-CAGop_C3_P3.fcs'],0,1);
120120
% You should see an error: need to "resolve" the color model first! Comment
121121
% out above line of code and run again.
@@ -160,7 +160,7 @@
160160
% even when it can be compensated for.
161161

162162

163-
compensated = readfcs_compensated_au(CM,[dosedata 'LacI-CAGop_C3_P3.fcs'],0,1);
163+
compensated = readfcs_compensated_au(CM,DataFile('fcs', [dosedata 'LacI-CAGop_C3_P3.fcs']),0,1);
164164
% The last two arguments are:
165165
% 1) Whether to add autofluorescence back in after reading (generally not done)
166166
% 2) Whether to map all values <= 0 to 1 (which is zero on the log scale)

03_flow_MEFL/exercises.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
% Calibration beads (Plots folder and Fig1 to Fig4):
1616
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1717
% Let's look at an example of SpheroTech RCP-30-5A calibration beads:
18-
fcs_scatter([colordata '2012-03-12_Beads_P3.fcs'],'Pacific Blue-A','PE-Tx-Red-YG-A',1,[0 0; 6 6],1); % Fig1
18+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_Beads_P3.fcs']),'Pacific Blue-A','PE-Tx-Red-YG-A',1,[0 0; 6 6],1); % Fig1
1919
% and without blending (density is 0)...
20-
fcs_scatter([colordata '2012-03-12_Beads_P3.fcs'],'Pacific Blue-A','PE-Tx-Red-YG-A',0,[0 0; 6 6],1); % Fig2
20+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_Beads_P3.fcs']),'Pacific Blue-A','PE-Tx-Red-YG-A',0,[0 0; 6 6],1); % Fig2
2121
% Notice that there is a nice, nearly linear sequence of 5 peaks
2222
% the last one (bottom left) is pretty blurry, as it comes down into
2323
% autofluorescence (failed transfection)
@@ -31,8 +31,8 @@
3131
% down near the bottom instead.
3232

3333
% Let's take a look at a different pair of channels:
34-
fcs_scatter([colordata '2012-03-12_Beads_P3.fcs'],'PE-Tx-Red-YG-A','FITC-A',1,[0 0; 6 6],1); % Fig3
35-
fcs_scatter([colordata '2012-03-12_Beads_P3.fcs'],'PE-Tx-Red-YG-A','FITC-A',0,[0 0; 6 6],1); % Fig4
34+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_Beads_P3.fcs']),'PE-Tx-Red-YG-A','FITC-A',1,[0 0; 6 6],1); % Fig3
35+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_Beads_P3.fcs']),'PE-Tx-Red-YG-A','FITC-A',0,[0 0; 6 6],1); % Fig4
3636
% Notice that the relationship of the peaks is not linear any more.
3737
% This is because the FITC peaks are much lower, and are blurring into autofluorescence
3838
% Thus, we need to calibrate using only peaks far from autofluorescence.
@@ -147,9 +147,9 @@
147147

148148
% We recommend 3 colors as best practices:
149149
% Let's look at such a multi-color control file:
150-
fcs_scatter([colordata '2012-03-12_mkate_EBFP2_EYFP_P3.fcs'],'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig5
150+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_mkate_EBFP2_EYFP_P3.fcs']),'FITC-A','Pacific Blue-A',1,[0 0; 6 6],1); % Fig5
151151
% and without blending...
152-
fcs_scatter([colordata '2012-03-12_mkate_EBFP2_EYFP_P3.fcs'],'FITC-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig6
152+
fcs_scatter(DataFile('fcs', [colordata '2012-03-12_mkate_EBFP2_EYFP_P3.fcs']),'FITC-A','Pacific Blue-A',0,[0 0; 6 6],1); % Fig6
153153
% Notice that it's only nicely linear for the higher levels,
154154
% and that it's much smearier than our compensation controls
155155
% The first is what set_translation_channel_min is for

template_analysis/batch_template.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@
3030
% Make a map of condition names to file sets
3131
stem1011 = '../example_assay/LacI-CAGop_';
3232
file_pairs = {...
33-
'Dox 0.1', {[stem1011 'B3_P3.fcs']}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
34-
'Dox 0.2', {[stem1011 'B4_P3.fcs']};
35-
'Dox 0.5', {[stem1011 'B5_P3.fcs']};
36-
'Dox 1.0', {[stem1011 'B6_P3.fcs']};
37-
'Dox 2.0', {[stem1011 'B7_P3.fcs']};
38-
'Dox 5.0', {[stem1011 'B8_P3.fcs']};
39-
'Dox 10.0', {[stem1011 'B9_P3.fcs']};
40-
'Dox 20.0', {[stem1011 'B10_P3.fcs']};
41-
'Dox 50.0', {[stem1011 'B11_P3.fcs']};
42-
'Dox 100.0', {[stem1011 'B12_P3.fcs']};
43-
'Dox 200.0', {[stem1011 'C1_P3.fcs']};
44-
'Dox 500.0', {[stem1011 'C2_P3.fcs']};
45-
'Dox 1000.0', {[stem1011 'C3_P3.fcs']};
46-
'Dox 2000.0', {[stem1011 'C4_P3.fcs']};
33+
'Dox 0.1', {DataFile('fcs', [stem1011 'B3_P3.fcs'])}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
34+
'Dox 0.2', {DataFile('fcs', [stem1011 'B4_P3.fcs'])};
35+
'Dox 0.5', {DataFile('fcs', [stem1011 'B5_P3.fcs'])};
36+
'Dox 1.0', {DataFile('fcs', [stem1011 'B6_P3.fcs'])};
37+
'Dox 2.0', {DataFile('fcs', [stem1011 'B7_P3.fcs'])};
38+
'Dox 5.0', {DataFile('fcs', [stem1011 'B8_P3.fcs'])};
39+
'Dox 10.0', {DataFile('fcs', [stem1011 'B9_P3.fcs'])};
40+
'Dox 20.0', {DataFile('fcs', [stem1011 'B10_P3.fcs'])};
41+
'Dox 50.0', {DataFile('fcs', [stem1011 'B11_P3.fcs'])};
42+
'Dox 100.0', {DataFile('fcs', [stem1011 'B12_P3.fcs'])};
43+
'Dox 200.0', {DataFile('fcs', [stem1011 'C1_P3.fcs'])};
44+
'Dox 500.0', {DataFile('fcs', [stem1011 'C2_P3.fcs'])};
45+
'Dox 1000.0', {DataFile('fcs', [stem1011 'C3_P3.fcs'])};
46+
'Dox 2000.0', {DataFile('fcs', [stem1011 'C4_P3.fcs'])};
4747
};
4848

4949
n_conditions = size(file_pairs,1);

template_analysis/batch_template_csv.m

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,29 @@
3030
% Make a map of condition names to file sets
3131
stem1011 = 'csv/LacI-CAGop_Dox';
3232
root1011 = '_PointCloud.csv';
33+
header = 'csv/LacI-CAGop.json';
3334
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]};
35+
'Dox 0.1', {DataFile('csv', [stem1011 '01' root1011], header)}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
36+
'Dox 0.2', {DataFile('csv', [stem1011 '02' root1011], header)};
37+
'Dox 0.5', {DataFile('csv', [stem1011 '05' root1011], header)};
38+
'Dox 1.0', {DataFile('csv', [stem1011 '1' root1011], header)};
39+
'Dox 2.0', {DataFile('csv', [stem1011 '2' root1011], header)};
40+
'Dox 5.0', {DataFile('csv', [stem1011 '5' root1011], header)};
41+
'Dox 10.0', {DataFile('csv', [stem1011 '10' root1011], header)};
42+
'Dox 20.0', {DataFile('csv', [stem1011 '20' root1011], header)};
43+
'Dox 50.0', {DataFile('csv', [stem1011 '50' root1011], header)};
44+
'Dox 100.0', {DataFile('csv', [stem1011 '100' root1011], header)};
45+
'Dox 200.0', {DataFile('csv', [stem1011 '200' root1011], header)};
46+
'Dox 500.0', {DataFile('csv', [stem1011 '500' root1011], header)};
47+
'Dox 1000.0', {DataFile('csv', [stem1011 '1000' root1011], header)};
48+
'Dox 2000.0', {DataFile('csv', [stem1011 '2000' root1011], header)};
4849
};
4950

5051
n_conditions = size(file_pairs,1);
5152

5253
% Execute the actual analysis
5354
TASBEConfig.set('OutputSettings.StemName','LacI-CAGop');
5455
TASBEConfig.set('OutputSettings.FixedInputAxis',[1e4 1e10]);
55-
% Set CSVReaderHeader (temporary feature)
56-
TASBEConfig.set('flow.defaultCSVReadHeader','csv/LacI-CAGop.json');
5756
% Generate point cloud csv files
5857
%TASBEConfig.set('flow.outputPointCloud', true);
5958
[results, sampleresults] = per_color_constitutive_analysis(CM,file_pairs,{'EYFP','mKate', 'EBFP2'},AP);

template_analysis/plusminus_template.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535
batch_description = {...
3636
{'Lows';'BaseDox';{'+', '-', 'control'};
3737
% First set is the matching "plus" conditions
38-
{0.1, {[stem1011 'C3_P3.fcs']}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
39-
0.2, {[stem1011 'C4_P3.fcs']}};
40-
{0.1, {[stem1011 'B3_P3.fcs']};
41-
0.2, {[stem1011 'B4_P3.fcs']}};
42-
{0.1, {[stem1011 'B9_P3.fcs']};
43-
0.2, {[stem1011 'B10_P3.fcs']}}};
38+
{0.1, {DataFile('fcs', [stem1011 'C3_P3.fcs'])}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
39+
0.2, {DataFile('fcs', [stem1011 'C4_P3.fcs'])}};
40+
{0.1, {DataFile('fcs', [stem1011 'B3_P3.fcs'])};
41+
0.2, {DataFile('fcs', [stem1011 'B4_P3.fcs'])}};
42+
{0.1, {DataFile('fcs', [stem1011 'B9_P3.fcs'])};
43+
0.2, {DataFile('fcs', [stem1011 'B10_P3.fcs'])}}};
4444
{'Highs';'BaseDox';{'+', '-'};
45-
{10, {[stem1011 'C3_P3.fcs']};
46-
20, {[stem1011 'C4_P3.fcs']}};
47-
{10, {[stem1011 'B9_P3.fcs']};
48-
20, {[stem1011 'B10_P3.fcs']}}};
45+
{10, {DataFile('fcs', [stem1011 'C3_P3.fcs'])};
46+
20, {DataFile('fcs', [stem1011 'C4_P3.fcs'])}};
47+
{10, {DataFile('fcs', [stem1011 'B9_P3.fcs'])};
48+
20, {DataFile('fcs', [stem1011 'B10_P3.fcs'])}}};
4949
};
5050

5151
% Execute the actual analysis

template_analysis/transfercurve_template.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
% Make a map of induction levels to file sets
3434
stem1011 = '../example_assay/LacI-CAGop_';
3535
level_file_pairs = {...
36-
0.1, {[stem1011 'B3_P3.fcs']}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
37-
0.2, {[stem1011 'B4_P3.fcs']};
38-
0.5, {[stem1011 'B5_P3.fcs']};
39-
1.0, {[stem1011 'B6_P3.fcs']};
40-
2.0, {[stem1011 'B7_P3.fcs']};
41-
5.0, {[stem1011 'B8_P3.fcs']};
42-
10.0, {[stem1011 'B9_P3.fcs']};
43-
20.0, {[stem1011 'B10_P3.fcs']};
44-
50.0, {[stem1011 'B11_P3.fcs']};
45-
100.0, {[stem1011 'B12_P3.fcs']};
46-
200.0, {[stem1011 'C1_P3.fcs']};
47-
500.0, {[stem1011 'C2_P3.fcs']};
48-
1000.0, {[stem1011 'C3_P3.fcs']};
49-
2000.0, {[stem1011 'C4_P3.fcs']};
36+
0.1, {DataFile('fcs', [stem1011 'B3_P3.fcs'])}; % Replicates go here, e.g., {[rep1], [rep2], [rep3]}
37+
0.2, {DataFile('fcs', [stem1011 'B4_P3.fcs'])};
38+
0.5, {DataFile('fcs', [stem1011 'B5_P3.fcs'])};
39+
1.0, {DataFile('fcs', [stem1011 'B6_P3.fcs'])};
40+
2.0, {DataFile('fcs', [stem1011 'B7_P3.fcs'])};
41+
5.0, {DataFile('fcs', [stem1011 'B8_P3.fcs'])};
42+
10.0, {DataFile('fcs', [stem1011 'B9_P3.fcs'])};
43+
20.0, {DataFile('fcs', [stem1011 'B10_P3.fcs'])};
44+
50.0, {DataFile('fcs', [stem1011 'B11_P3.fcs'])};
45+
100.0, {DataFile('fcs', [stem1011 'B12_P3.fcs'])};
46+
200.0, {DataFile('fcs', [stem1011 'C1_P3.fcs'])};
47+
500.0, {DataFile('fcs', [stem1011 'C2_P3.fcs'])};
48+
1000.0, {DataFile('fcs', [stem1011 'C3_P3.fcs'])};
49+
2000.0, {DataFile('fcs', [stem1011 'C4_P3.fcs'])};
5050
};
5151
experiment = Experiment(experimentName,{inducer_name}, level_file_pairs);
5252

template_colormodel/bead_comparison.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
stem0312 = '../example_controls/2012-03-12_';
44

5-
beadfiles = {[stem0312 'Beads_P3.fcs'], [stem0312 'Beads_P3.fcs']}; % Input beadfiles to compare into the beadfiles array
5+
beadfiles = {DataFile('fcs', [stem0312 'Beads_P3.fcs']), DataFile('fcs', [stem0312 'Beads_P3.fcs'])}; % Input beadfiles to compare into the beadfiles array
66

77
beadfile = beadfiles{1}; % A ColorModel will be built using the first beadfile
88
blankfile = '';
@@ -15,15 +15,18 @@
1515
% Do not duplicate laser/filter information, as this may cause analysis collisions
1616
channels{1} = Channel('FITC-A', 488, 515, 20);
1717
channels{1} = setPrintName(channels{1}, 'EYFP'); % Name to print on charts
18-
colorfiles{1} = ''; % Can remain empty to compare bead files
18+
channels{1} = setLineSpec(channels{1}, 'y'); % Color for lines, when needed
19+
colorfiles{1} = DataFile('fcs', [stem0312 'EYFP_P3.fcs']); % can't have empty colorfiles when doing bead comparisons
1920

2021
channels{2} = Channel('PE-Tx-Red-YG-A', 561, 610, 20);
2122
channels{2} = setPrintName(channels{2}, 'mKate');
22-
colorfiles{2} = '';
23+
channels{2} = setLineSpec(channels{2}, 'r');
24+
colorfiles{2} = DataFile('fcs', [stem0312 'mkate_P3.fcs']);
2325

2426
channels{3} = Channel('Pacific Blue-A', 405, 450, 50);
2527
channels{3} = setPrintName(channels{3}, 'EBFP2');
26-
colorfiles{3} = '';
28+
channels{3} = setLineSpec(channels{3}, 'b');
29+
colorfiles{3} = DataFile('fcs', [stem0312 'ebfp2_P3.fcs']);
2730

2831
CM = ColorModel(beadfile, blankfile, channels, colorfiles, colorpairfiles);
2932

template_colormodel/make_color_model.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
stem0312 = '../example_controls/2012-03-12_';
44

55

6-
beadfile = [stem0312 'Beads_P3.fcs'];
7-
blankfile = [stem0312 'blank_P3.fcs'];
6+
beadfile = DataFile('fcs', [stem0312 'Beads_P3.fcs']);
7+
blankfile = DataFile('fcs', [stem0312 'blank_P3.fcs']);
88

99
% Autodetect gating with an N-dimensional gaussian-mixture-model
1010
AGP = AutogateParameters();
@@ -25,17 +25,17 @@
2525
channels{1} = Channel('FITC-A', 488, 515, 20);
2626
channels{1} = setPrintName(channels{1}, 'EYFP'); % Name to print on charts
2727
channels{1} = setLineSpec(channels{1}, 'y'); % Color for lines, when needed
28-
colorfiles{1} = [stem0312 'EYFP_P3.fcs']; % If there is only one channel, the color file is optional
28+
colorfiles{1} = DataFile('fcs', [stem0312 'EYFP_P3.fcs']); % If there is only one channel, the color file is optional
2929

3030
channels{2} = Channel('PE-Tx-Red-YG-A', 561, 610, 20);
3131
channels{2} = setPrintName(channels{2}, 'mKate');
3232
channels{2} = setLineSpec(channels{2}, 'r');
33-
colorfiles{2} = [stem0312 'mkate_P3.fcs'];
33+
colorfiles{2} = DataFile('fcs', [stem0312 'mkate_P3.fcs']);
3434

3535
channels{3} = Channel('Pacific Blue-A', 405, 450, 50);
3636
channels{3} = setPrintName(channels{3}, 'EBFP2');
3737
channels{3} = setLineSpec(channels{3}, 'b');
38-
colorfiles{3} = [stem0312 'ebfp2_P3.fcs'];
38+
colorfiles{3} = DataFile('fcs', [stem0312 'ebfp2_P3.fcs']);
3939

4040
% FSC and SSC channels can be added to be read unprocessed to MEFL
4141
% channels{4} = Channel('FSC-A', 488, 488, 10);
@@ -51,8 +51,8 @@
5151
% Entries are: channel1, channel2, constitutive channel, filename
5252
% This allows channel1 and channel2 to be converted into one another.
5353
% If you only have two colors, you can set consitutive-channel to equal channel1 or channel2
54-
colorpairfiles{1} = {channels{1}, channels{2}, channels{3}, [stem0312 'mkate_EBFP2_EYFP_P3.fcs']};
55-
colorpairfiles{2} = {channels{1}, channels{3}, channels{2}, [stem0312 'mkate_EBFP2_EYFP_P3.fcs']};
54+
colorpairfiles{1} = {channels{1}, channels{2}, channels{3}, DataFile('fcs', [stem0312 'mkate_EBFP2_EYFP_P3.fcs'])};
55+
colorpairfiles{2} = {channels{1}, channels{3}, channels{2}, DataFile('fcs', [stem0312 'mkate_EBFP2_EYFP_P3.fcs'])};
5656

5757
% Size bead files are used for processing FSC-A units into um equivalent diameter
5858
% They are optional, and will not be used if size bead file is not set

tests/test_bead_comp.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function test_suite = test_bead_comp
2+
TASBEConfig.checkpoint('test');
3+
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
4+
test_functions=localfunctions();
5+
catch % no problem; early Matlab versions can use initTestSuite fine
6+
end
7+
initTestSuite;
8+
9+
function test_bead_comp_endtoend
10+
run template_colormodel/bead_comparison

0 commit comments

Comments
 (0)