-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanlz_2chn_dots.m
68 lines (47 loc) · 1.93 KB
/
anlz_2chn_dots.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%% anlz_2chn_dots.m
% Alistair Boettiger Date Begun: 02/02/11
% Levine Lab Last Modified: 02/19/11
%% Load data, histogram cell_counts
% Updated 02/19/11 to use fxn_compdotvar and fxn_regionvar
%
clear all;
folder = '/Users/alistair/Documents/Berkeley/Levine_Lab/Projects/Enhancer_Modeling/Data/';
% fname = 'MP05_sna_y_22C_04';
% fname = 'yw_ths_sog_01_lowt';
% fname = 'yw_ths_sog_02_p1p3'; cmax = 100;
% fname = 'yw_ths_sog_02_p5';
% YW ths sog. Run with .05 and .03 thresholds
% YW_ths_sog_01a, 03a, 04a
%
% YW_ths_sog_01b, Run with .07 and .05 thresholds
% YW_ths_sog_01b, Run with .1 and .05 thresholds
mRNA = linspace(0,400,30);
fname = 'YW_ths_sog_08'; % save([folder,fname,'.mat']);
load([folder,fname,'.mat']);
ths = mRNA_sadj1;
sog = mRNA_sadj2;
Nucs = NucLabeled;
Nnucs = max(NucLabeled(:));
conn = connectivity(NucLabeled);
subplot(2,1,1); hist(ths,mRNA); title('ths'); xlim([0,max(mRNA)]);
subplot(2,1,2); hist(sog,mRNA); title('sog'); xlim([0,max(mRNA)]);
[ths_plot,sog_plot,ths_var,sog_var] = fxn_compdotvar(Nucs,conn,ths,sog,Nnucs);
ths_on = ths > mean(ths)*.6;
sog_on = sog > mean(sog)*.6;
mean_ths_var = mean(ths_var(ths_on));
mean_sog_var = mean(sog_var(sog_on));
figure(3); clf; cmax = max(mRNA);
colordef black;
subplot(2,1,1); imagesc(ths_plot); colormap('hot'); colorbar;
set(gcf,'color','k');% caxis([0,cmax]);
title(['ths, local var = ',num2str(mean_ths_var,2)] );
subplot(2,1,2); imagesc(sog_plot); colormap('hot'); colorbar;
set(gcf,'color','k');
title(['sog, local var = ',num2str(mean_sog_var,2)] );
%% Define expression region
spread = 1.5;
t1 = .3;
figure(5); clf; subplot(1,2,1);
[ths_on_cnts,ths_off_cnts]= fxn_regionvar(Nucs,ths_plot,ths,t1,spread,Nnucs);
subplot(1,2,2);
[sog_on_cnts,sog_off_cnts]= fxn_regionvar(Nucs,sog_plot,sog,t1,spread,Nnucs);