Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 0aa615b374
...
compare: 1bbb5ed7a4
  • 2 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 11, 2011
Alistair Boettiger Running more data through dot-finding 0110bc4
Commits on Jun 18, 2011
Alistair Boettiger slightly revised plotting for view3D 1bbb5ed
View
14 Unsupervised_DotFinding.m
@@ -9,14 +9,14 @@
tot_time = tic;
% Input options
old_lab = 0;
-folder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/'; % '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
+folder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/2011-05-22/'; % '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
rawfolder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % '/Volumes/Data/Lab Data/Raw_Data/02-17-11/'; %% %
-stackfolder = 's02_MP01/';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
-fname = 's02_MP01_Hz_22C'; % 's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
+stackfolder = 's03_MP02/';% 's01_MP09/';% 's02_MP01/';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
+fname = 's03_MP02_Hz_22C_b';% 's01_MP09_Hz_22C_b';% 's02_MP01_Hz_22C'; % 's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
mRNA_channels = 2; % 3; % 1; % total mRNA channels
-
+sname = fname; % 's03_MP02_Hz_22C_b';%
ver = '';% '_v2';
% MP10_22C_sna_y_c and MP05_22C all done at 3.5, 4, 0.03, 30, 30
@@ -24,7 +24,7 @@
filename = [rawfolder,'/',fname];
-load([filename,ver,'.mat'])
+load([rawfolder,'/',sname,'.mat'])
Zs = Datas.LSM_info.DimensionZ;
w = Datas.Stack1.Image1.IMG.width;
h = Datas.Stack1.Image1.IMG.height;
@@ -63,7 +63,7 @@
% sphere finding parameters
getpreciseZ = 0;
- consec_layers = 2;
+ consec_layers = 3;
ovlap = 4;
%---------------------------------%
@@ -111,7 +111,7 @@
for mRNAchn = 1:mRNA_channels % mRNAchn =2
if mRNAchn == 1;
- min_int = 0.05; % just for speed
+ min_int = 0.05; % just for speed
else
min_int = 0.02; %
end
View
14 Unsupervised_DotFinding.m~
@@ -12,11 +12,11 @@ old_lab = 0;
folder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/'; % '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
rawfolder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % '/Volumes/Data/Lab Data/Raw_Data/02-17-11/'; %% %
-stackfolder = 's02_MP01';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
-fname = 's02_MP01's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
+stackfolder = 's03_MP02/';% 's01_MP09/';% 's02_MP01/';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
+fname = 's03_MP02_Hz_22C_b';% 's01_MP09_Hz_22C_b';% 's02_MP01_Hz_22C'; % 's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
mRNA_channels = 2; % 3; % 1; % total mRNA channels
-
+sname = fname; % 's03_MP02_Hz_22C_b';%
ver = '';% '_v2';
% MP10_22C_sna_y_c and MP05_22C all done at 3.5, 4, 0.03, 30, 30
@@ -24,7 +24,7 @@ ver = '';% '_v2';
filename = [rawfolder,'/',fname];
-load([filename,ver,'.mat'])
+load([rawfolder,'/',sname,'.mat'])
Zs = Datas.LSM_info.DimensionZ;
w = Datas.Stack1.Image1.IMG.width;
h = Datas.Stack1.Image1.IMG.height;
@@ -63,7 +63,7 @@ disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1),
% sphere finding parameters
getpreciseZ = 0;
- consec_layers = 2;
+ consec_layers = 3;
ovlap = 4;
%---------------------------------%
@@ -111,9 +111,9 @@ for e= 1:Es
for mRNAchn = 1:mRNA_channels % mRNAchn =2
if mRNAchn == 1;
- min_int = 0.05; % just for speed
+ min_int = 0.05; % just for speed
else
- min_int = 0.05; %
+ min_int = 0.02; %
end
DotLabels= cell(1,Zs);
View
28 Unsupervised_DotFinding2.m
@@ -12,11 +12,11 @@
folder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/'; % '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
rawfolder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % '/Volumes/Data/Lab Data/Raw_Data/02-17-11/'; %% %
-stackfolder = 's06_MP10_sna18/'; %'s01_MP09/'; %'s10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
-fname ='s06_MP10_sna18'; %'s10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
+stackfolder = 's02_MP01/';% 's06_MP10_sna18/'; %'s01_MP09/'; %'s10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
+fname ='s02_MP01_Hz_22C_b'; % 's06_MP10_sna18'; %'s10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
mRNA_channels = 2; % 3; % 1; % total mRNA channels
-sver = '_1'; % additional label on slide.
+sver = '';% '_1'; % additional label on slide.
ver = '';% '_v2';
% MP10_22C_sna_y_c and MP05_22C all done at 3.5, 4, 0.03, 30, 30
@@ -57,13 +57,13 @@
% dotfinder's parameters
sigmaE = 3;% IMPORTANT
sigmaI = 4; % IMPORTANT
- % min_int = 0.04; % 5 ;% .05 % not necessary Fix at Zero
+ min_int = 0.03; % 5 ;% .05 % not necessary Fix at Zero
FiltSize = 30;%
min_size = 30;%
% sphere finding parameters
getpreciseZ = 0;
- consec_layers = 2;
+ consec_layers = 3;
ovlap = 4;
%---------------------------------%
@@ -111,7 +111,7 @@
for mRNAchn = 1:mRNA_channels % mRNAchn =2
if mRNAchn == 1;
- min_int = 0.05; % just for speed
+ min_int = 0.05; % .05 just for speed
else
min_int = 0.02; %
end
@@ -132,7 +132,8 @@
%%
-
+ % consec_layers = 4;
+
intype = class(Iin_z);
dotC = CheckDotUpDown(DotLabels,DotData,Inds,Ints,plotdata,getpreciseZ,consec_layers,ovlap,xp1,xp2,yp1,yp2,intype);
Cents = cell2mat(DotData');
@@ -156,9 +157,7 @@
plot( Cents(:,1),Cents(:,2),'yo','MarkerSize',4);
saveas(Iout,[folder,fname,'_',emb,'_chn',num2str(mRNAchn),ver,'.fig']);
end
- %%
-
- clear Imax Cents DotData DotLabels Inds Ints Iin_z
+
%%
@@ -272,17 +271,10 @@
toc
end % end loop over mNRA channels
% clean up;
- clear Iin_z DotData DotMasks I_max cent1 bw dL Cents ...
- Nmin imdata imdata2 NucLabel NucLabeled Plot_mRNA M C ...
- nuc_area dotC mRNA_cnt mRNA_den mRNA_sadj inds conn_map;
-
+
end % end loop over embryos
-
- clear Iin_z DotData DotMasks I_max cent1 bw dL Cents ...
- Nmin imdata imdata2 NucLabeled Plot_mRNA M C ...
- nuc_area dotC mRNA_cnt mRNA_den mRNA_sadj;
%save([folder,fname,'_slidedata',ver], 'Data');
View
30 Unsupervised_DotFinding2.m~
@@ -14,17 +14,17 @@ rawfolder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % '/Volumes/Data/Lab
stackfolder = 's06_MP10_sna18/'; %'s01_MP09/'; %'s10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
fname ='s06_MP10_sna18'; %'s10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
-mRNA_channels = 2; % 3; % 1; % total mRNA channels
+mRNA_channels = 3; % 3; % 1; % total mRNA channels
-
-ver = '';% '_v2';
+sver = '_1'; % additional label on slide.
+ver = '_v2';% '_v2';
% MP10_22C_sna_y_c and MP05_22C all done at 3.5, 4, 0.03, 30, 30
% MGa2x and MGa1x all done at 2.5, 3, 0.03, 30, 30
filename = [rawfolder,'/',fname];
-load([filename,ver,'.mat'])
+load([filename,sver,'.mat'])
Zs = Datas.LSM_info.DimensionZ;
w = Datas.Stack1.Image1.IMG.width;
h = Datas.Stack1.Image1.IMG.height;
@@ -57,13 +57,13 @@ disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1),
% dotfinder's parameters
sigmaE = 3;% IMPORTANT
sigmaI = 4; % IMPORTANT
- % min_int = 0.04; % 5 ;% .05 % not necessary Fix at Zero
+ min_int = 0.03; % 5 ;% .05 % not necessary Fix at Zero
FiltSize = 30;%
min_size = 30;%
% sphere finding parameters
getpreciseZ = 0;
- consec_layers = 2;
+ consec_layers = 3;
ovlap = 4;
%---------------------------------%
@@ -108,7 +108,7 @@ for e= 1:Es
toc
- for mRNAchn = 1:mRNA_channels % mRNAchn =2
+ for mRNAchn = 3:mRNA_channels % mRNAchn =2
if mRNAchn == 1;
min_int = 0.05; % just for speed
@@ -132,7 +132,8 @@ for e= 1:Es
%%
-
+ % consec_layers = 4;
+
intype = class(Iin_z);
dotC = CheckDotUpDown(DotLabels,DotData,Inds,Ints,plotdata,getpreciseZ,consec_layers,ovlap,xp1,xp2,yp1,yp2,intype);
Cents = cell2mat(DotData');
@@ -156,9 +157,7 @@ for e= 1:Es
plot( Cents(:,1),Cents(:,2),'yo','MarkerSize',4);
saveas(Iout,[folder,fname,'_',emb,'_chn',num2str(mRNAchn),ver,'.fig']);
end
- %%
-
- clear Imax Cents DotData DotLabels Inds Ints Iin_z
+
%%
@@ -272,17 +271,10 @@ Rpars.ovlap = ovlap;
toc
end % end loop over mNRA channels
% clean up;
- clear Iin_z DotData DotMasks I_max cent1 bw dL Cents ...
- Nmin imdata imdata2 NucLabel NucLabeled Plot_mRNA M C ...
- nuc_area dotC mRNA_cnt mRNA_den mRNA_sadj inds conn_map;
-
+
end % end loop over embryos
-
- clear Iin_z DotData DotMasks I_max cent1 bw dL Cents ...
- Nmin imdata imdata2 NucLabeled Plot_mRNA M C ...
- nuc_area dotC mRNA_cnt mRNA_den mRNA_sadj;
%save([folder,fname,'_slidedata',ver], 'Data');
View
21 im_nucseg.m
@@ -430,21 +430,26 @@ function LoadNext_Callback(hObject, eventdata, handles)
% fname = [handles.fin,'/',handles.fname,'_',handles.embn,'_max.tif'];
fname = [handles.fin,'/','max_',handles.fname,'_',handles.embn,'.tif'];
handles.Im = imread(fname);
+
+
h = size(handles.Im,1);
+ Nuc = handles.Im(:,:,handles.NucChn);
+ scale = handles.imsize/h;
+ handles.Nucs = imresize(Nuc,scale);
+ disp(['rescaling to ',num2str(scale*100,3), ' percent']);
- scale = 512/h;
- Imini = imresize(handles.Im,scale);
try
+ Imini = imresize(handles.Im,scale);
figure(1); clf; imshow(Imini);
-catch me
- disp(me.message);
+catch
+ try % try just nuclear layer.
+ figure(1); clf; imagesc(Nuc); colormap gray;
+ catch me
+ disp(me.message);
+ end
end
- Nuc = handles.Im(:,:,handles.NucChn);
- h = size(Nuc,1);
- handles.Nucs = imresize(Nuc,handles.imsize/h);
- disp(['rescaling to ',num2str(handles.imsize/h*100,3), ' percent']);
handles.output = hObject;
guidata(hObject,handles);% pause(.1);
View
17 im_nucseg.m~
@@ -175,8 +175,14 @@ if step == 2;
Cell_bnd(cell_bords) = 1;
Cell_bnd = bwareaopen( Cell_bnd,100);
- class(handles.Nucs);
- Nucs = handles.Nucs + uint16(2^16*Cell_bnd);
+ int = class(handles.Nucs);
+ if strcmp(int,'uint16')
+ Nucs = handles.Nucs + uint16(2^16*Cell_bnd);
+ elseif strcmp(int,'uint8')
+ Nucs = handles.Nucs + uint8(2^8*Cell_bnd);
+ end
+
+
figure(21); clf; imagesc(Nucs); colormap('hot');
@@ -427,10 +433,15 @@ disp('loading image...');
h = size(handles.Im,1);
scale = 512/h;
- Imini = imresize(handles.Im,scale);
+
try
+ Imini = imresize(handles.Im,scale);
figure(1); clf; imshow(Imini);
catch me
+ try
+ figure(1); clf; imagesc( imresize(
+ catch
+ end
disp(me.message);
end
View
2  imviewer_lsm.m
@@ -364,7 +364,7 @@ function setup(hObject,eventdata,handles)
% set(handles.VarButtonName,'String','');
dir = {'Step 1: Export layer data as tifs and max project between chosen';
'starting and ending frames. Use 0 for last frame to use all data.';
- 'Optional: change channel order e.g. [4,3,1,2]'} ;
+ 'Optional: change channel order e.g. [4,3,2,1]'} ;
set(handles.directions,'String',dir);
end
View
145 view3Dchromatin.m
@@ -1,6 +1,6 @@
%% view3Dchromatin.m
-% Alistair Boettiger Date Begun: 02/14/11
-% Last Modified: 03/20/11
+% Alistair Boettiger Date Begun: 02/14/11
+% Last Modified: 06/17/11
%% Updates
@@ -11,26 +11,43 @@
% folder = '/Volumes/Data/Lab Data/Raw_Data/02-06-11/';
% fname = 'MP10_22C_sna_y_c'; emb = '01';
- folder = '/Volumes/Data/Lab Data/Raw_Data/02-17-11/';
- datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
- stackfolder = 'CadN/'; % 'MP09_22C/'; %
- %fname ='MP09_22C_hb_y_a'; emb = '01' ; xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
- fname = 'CadN'; emb = '06'; xp1 = 1275; yp1 = 1050; xp2 = xp1+100; yp2 = yp1+100;
+% folder = '/Volumes/Data/Lab Data/Raw_Data/02-17-11/';
+% datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
+% stackfolder = 'CadN/'; % 'MP09_22C/'; %
+ % fname ='MP09_22C_hb_y_a'; emb = '01' ; xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
+ % fname = 'CadN'; emb = '06'; xp1 = 1275; yp1 = 1050; xp2 = xp1+100; yp2 = yp1+100;
- stackdisks = 0;
+
+datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/2011-05-11/'; %
+folder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % /02-17-11/'; %% %
+stackfolder = 's01_MP09/';% 's03_MP02/';% 's02_MP01/';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
+fname = 's01_MP09_Hz_22C'; emb = '09'; % 's03_MP02_Hz_22C'; emb = '01'; % 's02_MP01_Hz_22C'; emb = '04'; % 's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
+
+
+ stackdisks = 0; zspace = 330;
+ shownucs = 0; disp_nascent = 0;
Imax = imread([folder,stackfolder,'max_',fname,'_',emb,'.tif']);
- figure(10); clf; imagesc(Imax);
- [h,w] = size(Imax);
%%
-%xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
- xp1 = 1850; yp1 = 990; xp2 = xp1+100; yp2 = yp1+100;
- figure(10); clf; imagesc(Imax(xp1:xp2,yp1:yp2,:));
- disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1), ' : ', num2str(yp2) ] );
- [hs,ws] = size(Imax(xp1:xp2,yp1:yp2,1));
+%xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100; nt = 5;
+% xp1 = 1850; yp1 = 990; xp2 = xp1+100; yp2 = yp1+100; nt = 5;
+ xp1 = 145; yp1 = 1660; xp2 = xp1+260; yp2 = yp1+260; nt = 5; % MP09_09;
+ % xp1 = 1245; yp1 = 1260; xp2 = xp1+260; yp2 = yp1+260; nt = 15; % MP01_04 nascent;
+ % xp1 = 200; yp1 = 1200; xp2 = xp1+260; yp2 = yp1+260; nt = 15; % MP01_04; dots
+ % xp1 = 1130; yp1 = 700; xp2 = xp1+260; yp2 = yp1+260; nt = .5; % MP02_01;
+
+ % Imax(:,:,2) = 10*Imax(:,:,2);
+
+ figure(10); clf; imagesc(Imax); colordef black; set(gcf,'color','k');
+ hold on; plot([yp1,yp2,yp2,yp1,yp1],[xp1,xp1,xp2,xp2,xp1],'w');
+
+ figure(9); clf; imagesc(Imax(xp1:xp2,yp1:yp2,:));
+ disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1), ' : ', num2str(yp2) ] );
+ [hs,ws] = size(Imax(xp1:xp2,yp1:yp2,1));
+ [h,w] = size(Imax);
@@ -49,7 +66,8 @@
try
im_folder{z} = [folder,stackfolder,fname,'_',emb,'_z',num2str(z),'.tif'];
Iin_z = imread(im_folder{z});
- catch
+ catch err
+ disp(err.message);
break
end
@@ -67,38 +85,95 @@
toc
+%% load mRNA data Prep 3D-isosurfaces view
+% load([datafolder,fname,'_slidedata'], 'Data');
+load([datafolder,fname,'_',emb,'_chn1','_data.mat']);
+
+d = dotC;
+d1 = d(d(:,2)>xp1 & d(:,2)<xp2 & d(:,1)>yp1 & d(:,1)<yp2,:);
+
+load([datafolder,fname,'_',emb,'_chn2','_data.mat']);
+d = dotC;
+d2 = d(d(:,2)>xp1 & d(:,2)<xp2 & d(:,1)>yp1 & d(:,1)<yp2,:);
-%% 3D-isosurfaces view
-stp = 1;
-Zmax = 30;
+
+%% 3D-isosurfaces view, Prep
+stp = 1;
+Zmax = 50;
x = (1:stp:ws)*50;
y = (1:stp:hs)*50;
- z = Zs*380-380*(1:Zmax);
-% z = 380*(1:Zs);
+ z = Zs*zspace-zspace*(1:Zmax);
[X,Y,Z] = meshgrid(x,y,z);
data = Inuc(1:stp:end,1:stp:end,1:Zmax);
data(isnan(data)) = 0;
-data = smooth3(data,'box',5);
+data = smooth3(data,'box',15);
+
+%% 3D-isosurfaces view, Draw
+tic
+disp('plotting data...');
-%%
+
+
+% adust intensity threshold for nascent transcript detection
+lev1 = 6;
+lev2 = .92;
figure(4); clf;
-% patch(isosurface(Y,X,Z,data,35),'FaceColor','blue','EdgeColor','none'); hold on; alpha 1;
-% patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),9550),'FaceColor','red','EdgeColor','none'); alpha .5
-% patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),2550),'FaceColor','green','EdgeColor','none');
-
-patch(isosurface(Y,X,Z,data,40),'FaceColor','blue','EdgeColor','none'); hold on; alpha .5;
-patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),21000),'FaceColor','red','EdgeColor','none'); alpha .5
-patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),11000),'FaceColor','green','EdgeColor','none');
-
- camlight(5,30);
-light('Position',[1000,1.5E4 8000],'Style','local');
- lighting phong; % view(112,34);
-view(-111,38);
+if shownucs ==1
+patch(isosurface(Y,X,Z,data,nt,'material','dull'),'FaceColor','blue','EdgeColor','none'); hold on; alpha .3;
+end
+
+if disp_nascent == 1
+patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),lev1*25000,'material','shiny'),'FaceColor','red','EdgeColor','none'); alpha .3
+patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),lev2*15100,'material','shiny'),'FaceColor','green','EdgeColor','none');
+end
+
set(gcf,'color','k'); set(gca,'color','k');
+toc
+
+%% 3D-isosurfaces Draw dots
+tic
+
+points1 = [d1(:,1)*50-yp1*50,d1(:,2)*50-xp1*50,zspace*Zs-zspace*d1(:,3)];
+points2 = [d2(:,1)*50-yp1*50,d2(:,2)*50-xp1*50,zspace*Zs-zspace*d2(:,3)];
+
+V1 = zeros(size(X)); V2 = V1;
+
+ind1 = cell(Zs,1);
+ind2 = cell(Zs,1);
+for zs =1:Zs;
+ layer = d1(:,3)<zs+1 & d1(:,3)>zs -1;
+ xs = points1(layer,1)/(50*ws)*length(x);
+ ys = points1(layer,2)/(50*hs)*length(y);
+ ind1{zs} = floor(xs) + length(y)*(floor(ys)) + length(x)*length(y)*(zs-1);
+
+ layer = d2(:,3)<zs+1 & d2(:,3)>zs -1;
+ xs = points2(layer,1)/(50*ws)*length(x);
+ ys = points2(layer,2)/(50*hs)*length(y);
+ ind2{zs} = floor(xs) + length(y)*(floor(ys)) + length(x)*length(y)*(zs-1);
+
+end
+inds1 = cell2mat(ind1);
+inds2 = cell2mat(ind2);
+V1(inds1) = 20;
+V2(inds2) = 20;
+
+
+figure(4); hold on;
+ patch(isosurface(X,Y,Z,V1,1,'material','dull'),'FaceColor','c','EdgeColor','none');
+patch(isosurface(X,Y,Z,V2,.5,'material','dull'),'FaceColor','k','EdgeColor','none');
+% camlight left;
+%light('Position',[1000,1.5E4 8000],'Style','local');
+% lighting phong; % view(112,34);
+view(194,80);
+%
+
+toc
+
+
View
143 view3Dchromatin.m~
@@ -11,26 +11,43 @@ clear all;
% folder = '/Volumes/Data/Lab Data/Raw_Data/02-06-11/';
% fname = 'MP10_22C_sna_y_c'; emb = '01';
- folder = '/Volumes/Data/Lab Data/Raw_Data/02-17-11/';
- datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
- stackfolder = 'CadN/'; % 'MP09_22C/'; %
- %fname ='MP09_22C_hb_y_a'; emb = '01' ; xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
- fname = 'CadN'; emb = '06'; xp1 = 1275; yp1 = 1050; xp2 = xp1+100; yp2 = yp1+100;
-
- stackdisks = 0;
+% folder = '/Volumes/Data/Lab Data/Raw_Data/02-17-11/';
+% datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
+% stackfolder = 'CadN/'; % 'MP09_22C/'; %
+ % fname ='MP09_22C_hb_y_a'; emb = '01' ; xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
+ % fname = 'CadN'; emb = '06'; xp1 = 1275; yp1 = 1050; xp2 = xp1+100; yp2 = yp1+100;
+
+
+datafolder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/mRNA_counting/Data/'; % '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
+folder = '/Volumes/Data/Lab Data/Raw_Data/2011-05-22/'; % '/Volumes/Data/Lab Data/Raw_Data/02-17-11/'; %% %
+stackfolder = 's01_MP09/';% 's03_MP02/';% 's02_MP01/';% 's10_bcd1x/';% 's11_bcd6x/'; %'s14_comp_cntrl/'; % 's12_cntrl_2label/'; %'MP02_22C/'; %'MP01_22C/'; % 'MGa1x/'; % 'MP10_22C/'; %'MP05_22C/'; %'YW_ths_sog/'; % 'MP10_22C/'; % % 'MP09_22C/'; % 'MGa2x/'; % 'MGa1x/'; % 'MGa2x/'; % 'MP10_22C_sna_y_c/'; %
+fname = 's01_MP09_Hz_22C'; emb = '09'; % 's03_MP02_Hz_22C'; emb = '01'; % 's02_MP01_Hz_22C'; emb = '04'; % 's10_bcd1x';% 's11_bcd6x'; % 's14_comp_cntrl'; Es =1; % 's12_cntrl_2label'; Es = 1; % 'MP09_22C_hb_y_f'; Es = 7; % 'MP02_22C_hb_y'; Es = 9; % 'MP02_22C_hb_y_b'; Es = 10; % % 'MP01_22C_hb_y_f'; Es = 12; % 'MP01_22C_hb_y_c'; Es = 10; % 'MP01_22C_hb_y'; Es = 13; % 'MGa1x_LacZ_b'; Es = 12; % 'MP10_22C_sna_y_e'; Es = 12; % 'MP05_22C_sna_y_c'; Es =7; % 'MP10_22C_sna_y_d3'; Es = 1; %'YW_ths_sog'; Es = 12; % % 'MP09_22C_hb_y_e'; Es = 10; % 'MP09_22C_hb_y_d'; Es=11; % 'MGa2x_LacZ_sna_b'; Es = 10; % 'MP10_22C_sna_y_d'; % 'MGa_LacZ'; %'MGa2x_LacZ_sna'; %'MP10_22C_sna_y_c'; old_lab = 1; % 'MP05_22C_sna_y'; old_lab = 1; %
+
+
+ stackdisks = 0; zspace = 330;
+ shownucs = 0; disp_nascent = 0;
Imax = imread([folder,stackfolder,'max_',fname,'_',emb,'.tif']);
- figure(10); clf; imagesc(Imax);
- [h,w] = size(Imax);
%%
-%xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100;
- xp1 = 215; yp1 = 750; xp2 = xp1+100; yp2 = yp1+100;
- figure(10); clf; imagesc(Imax(xp1:xp2,yp1:yp2,:));
- disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1), ' : ', num2str(yp2) ] );
- [hs,ws] = size(Imax(xp1:xp2,yp1:yp2,1));
+%xp1 = 600; yp1 = 660; xp2 = xp1+100; yp2 = yp1+100; nt = 5;
+% xp1 = 1850; yp1 = 990; xp2 = xp1+100; yp2 = yp1+100; nt = 5;
+ xp1 = 145; yp1 = 1660; xp2 = xp1+260; yp2 = yp1+260; nt = 5; % MP09_09;
+ % xp1 = 1245; yp1 = 1260; xp2 = xp1+260; yp2 = yp1+260; nt = 15; % MP01_04 nascent;
+ % xp1 = 200; yp1 = 1200; xp2 = xp1+260; yp2 = yp1+260; nt = 15; % MP01_04; dots
+ % xp1 = 1130; yp1 = 700; xp2 = xp1+260; yp2 = yp1+260; nt = .5; % MP02_01;
+
+ % Imax(:,:,2) = 10*Imax(:,:,2);
+
+ figure(10); clf; imagesc(Imax); colordef black; set(gcf,'color','k');
+ hold on; plot([yp1,yp2,yp2,yp1,yp1],[xp1,xp1,xp2,xp2,xp1],'w');
+
+ figure(9); clf; imagesc(Imax(xp1:xp2,yp1:yp2,:));
+ disp(['Coordinates: ', num2str(xp1), ' : ', num2str(xp2), ', ' num2str(yp1), ' : ', num2str(yp2) ] );
+ [hs,ws] = size(Imax(xp1:xp2,yp1:yp2,1));
+ [h,w] = size(Imax);
@@ -49,7 +66,8 @@ for z = 1:Zs % z = 20
try
im_folder{z} = [folder,stackfolder,fname,'_',emb,'_z',num2str(z),'.tif'];
Iin_z = imread(im_folder{z});
- catch
+ catch err
+ disp(err.message);
break
end
@@ -67,38 +85,95 @@ end
toc
+%% load mRNA data Prep 3D-isosurfaces view
+% load([datafolder,fname,'_slidedata'], 'Data');
+load([datafolder,fname,'_',emb,'_chn1','_data.mat']);
+
+d = dotC;
+d1 = d(d(:,2)>xp1 & d(:,2)<xp2 & d(:,1)>yp1 & d(:,1)<yp2,:);
+
+load([datafolder,fname,'_',emb,'_chn2','_data.mat']);
+d = dotC;
+d2 = d(d(:,2)>xp1 & d(:,2)<xp2 & d(:,1)>yp1 & d(:,1)<yp2,:);
-%% 3D-isosurfaces view
-stp = 1;
-Zmax = 30;
+
+%% 3D-isosurfaces view, Prep
+stp = 1;
+Zmax = 50;
x = (1:stp:ws)*50;
y = (1:stp:hs)*50;
- z = Zs*380-380*(1:Zmax);
-% z = 380*(1:Zs);
+ z = Zs*zspace-zspace*(1:Zmax);
[X,Y,Z] = meshgrid(x,y,z);
data = Inuc(1:stp:end,1:stp:end,1:Zmax);
data(isnan(data)) = 0;
-data = smooth3(data,'box',5);
+data = smooth3(data,'box',15);
+
+%% 3D-isosurfaces view, Draw
+tic
+disp('plotting data...');
-%%
+
+
+% adust intensity threshold for nascent transcript detection
+lev1 = 6;
+lev2 = .92;
figure(4); clf;
-% patch(isosurface(Y,X,Z,data,35),'FaceColor','blue','EdgeColor','none'); hold on; alpha 1;
-% patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),9550),'FaceColor','red','EdgeColor','none'); alpha .5
-% patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),2550),'FaceColor','green','EdgeColor','none');
-
-patch(isosurface(Y,X,Z,data,40),'FaceColor','blue','EdgeColor','none'); hold on; alpha .5;
-patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),21000),'FaceColor','red','EdgeColor','none'); alpha .5
-patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),11000),'FaceColor','green','EdgeColor','none');
-
- camlight(5,30);
-light('Position',[1000,1.5E4 8000],'Style','local');
- lighting phong; % view(112,34);
-view(-111,38);
+if shownucs ==1
+patch(isosurface(Y,X,Z,data,nt,'material','dull'),'FaceColor','blue','EdgeColor','none'); hold on; alpha .3;
+end
+
+if disp_nascent == 1
+patch(isosurface(Y,X,Z,Isect1(1:stp:end,1:stp:end,1:Zmax),lev1*25000,'material','shiny'),'FaceColor','red','EdgeColor','none'); alpha .3
+patch(isosurface(Y,X,Z,Isect2(1:stp:end,1:stp:end,1:Zmax),lev2*15100,'material','shiny'),'FaceColor','green','EdgeColor','none');
+end
+
set(gcf,'color','k'); set(gca,'color','k');
+toc
+
+%% 3D-isosurfaces Draw dots
+tic
+
+points1 = [d1(:,1)*50-yp1*50,d1(:,2)*50-xp1*50,zspace*Zs-zspace*d1(:,3)];
+points2 = [d2(:,1)*50-yp1*50,d2(:,2)*50-xp1*50,zspace*Zs-zspace*d2(:,3)];
+
+V1 = zeros(size(X)); V2 = V1;
+
+ind1 = cell(Zs,1);
+ind2 = cell(Zs,1);
+for zs =1:Zs;
+ layer = d1(:,3)<zs+1 & d1(:,3)>zs -1;
+ xs = points1(layer,1)/(50*ws)*length(x);
+ ys = points1(layer,2)/(50*hs)*length(y);
+ ind1{zs} = floor(xs) + length(y)*(floor(ys)) + length(x)*length(y)*(zs-1);
+
+ layer = d2(:,3)<zs+1 & d2(:,3)>zs -1;
+ xs = points2(layer,1)/(50*ws)*length(x);
+ ys = points2(layer,2)/(50*hs)*length(y);
+ ind2{zs} = floor(xs) + length(y)*(floor(ys)) + length(x)*length(y)*(zs-1);
+
+end
+inds1 = cell2mat(ind1);
+inds2 = cell2mat(ind2);
+V1(inds1) = 20;
+V2(inds2) = 20;
+
+
+figure(4); hold on;
+ patch(isosurface(X,Y,Z,V1,1,'material','dull'),'FaceColor','c','EdgeColor','none');
+patch(isosurface(X,Y,Z,V2,.5,'material','dull'),'FaceColor','k','EdgeColor','none');
+% camlight left;
+%light('Position',[1000,1.5E4 8000],'Style','local');
+% lighting phong; % view(112,34);
+view(194,80);
+%
+
+toc
+
+

No commit comments for this range

Something went wrong with that request. Please try again.