-
Notifications
You must be signed in to change notification settings - Fork 0
/
shadow_heatstress_data.m~
445 lines (368 loc) · 14.9 KB
/
shadow_heatstress_data.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
% Shadow Data Tabulated
% Alistair Boettiger Date Begun: 09/??/09
% Levine Lab Last Modified: 11/30/09
clear all;
%% Perturbation Data
%% Sna perturbation stuff
snaS_YW = [
1034,1051,6,9,4990,8475,1
653,708,5,2,4525,8892,2
1160,1220,5,9,3148,10757,3
1001,977,1,0,7851,2531,4
950,1055,2,15,2983,18670,5
622,658,0,9,3677,10923,2
977,1018,6,11,4370,22420,3
];
snaS_dl6 = [
1261,1099,97,0,36816,152,2
1008,904,65,11,39594,7718,3
846,819,19,0,7978,3037,4
1060,896,105,17,49537,7532,5
582,515,33,0,16414,3118,6
964,921,15,1,12654,1904,7
933,888,27,4,14891,2588,8
];
figure(6); clf;
% scatter(log10(snaS_YW(:,4)),(snaS_YW(:,3)),'g.','SizeData',500);
% hold on; xlabel('log10(# in sna not LacZ)','FontSize',16);
% scatter(log10(snaS_dl6(:,3)),(snaS_dl6(:,4)),'r.','SizeData',500);
% hold on; ylabel('# in LacZ not sna','FontSize',16);
scatter(snaS_YW(:,4),(snaS_YW(:,3)),'g.','SizeData',500);
hold on; xlabel('# cells lost expression','FontSize',16);
scatter(snaS_dl6(:,3),(snaS_dl6(:,4)),'r.','SizeData',500);
hold on; ylabel('# cells extra expression','FontSize',16);
set(gcf,'color','k'); set(gca,'FontSize',16);
title('Effect of Stress on Expression');
legend('control','stressed');
xlim([0,110]); ylim([0,50]);
% figure(5); clf;
% hist([snaS_YW(:,4),snaS_dl6(:,3)],0:25:100);
%% Sog perturbation stuff
YW29_sog_Neu3 = [
237,238,290,419,0.8,0.53938,2030,1;
437,254,449,350,0.91314,0.61714,1747,2;
981,307,710,485,0.91972,0.56289,1814,3;
771,1082,788,991,0.90863,0.83754,1859,4;
975,319,696,608,0.93247,0.50164,1673,5;
600,322,471,541,0.8811,0.5305,1502,6;
906,205,788,476,0.93528,0.38866,1571,7;
1299,1264,924,1063,0.95238,0.84948,1945,9;
788,798,846,688,0.85225,0.86628,2007,10;
1108,833,725,606,0.98069,0.93564,1841,12;
943,386,1023,937,0.94721,0.42796,1811,13;
556,794,614,655,0.85505,0.87939,1615,14;
1171,400,816,636,0.9424,0.51887,1823,15;
871,793,866,725,0.93533,0.80966,1597,16;
978,980,708,782,0.91384,0.86445,1547,17;
365,67,373,171,0.87131,0.37427,1263,18;
1035,858,695,862,0.92662,0.77494,1725,22;
916,653,904,714,0.88274,0.73249,1719,23;
545,904,680,881,0.71471,0.79342,2045,24;
1238,849,910,850,0.86484,0.76941,2130,25];
YW29_vn_Mes2 = [
116,355,226,576,0.34956,0.47743,1484,8
752,125,499,144,0.81764,0.56944,2046,5
518,627,383,644,0.78851,0.72516,1551,6
403,385,415,331,0.66265,0.83686,1870,7
92,308,232,585,0.28448,0.41709,1484,8
95,118,236,117,0.33898,0.70085,1898,10
13,1346,26,954,0.30769,0.91614,1350,11
554,102,383,234,0.84073,0.28205,2082,13
527,430,457,313,0.73961,0.90096,2071,17
228,146,391,175,0.49361,0.59429,2015,18
869,107,535,637,0.8729,0.12716,1688,19
368,153,341,146,0.68035,0.75342,2022,20
832,30,562,158,0.82918,0.14557,2071,21
209,769,255,583,0.52941,0.86792,1503,22
51,472,189,501,0.19577,0.7006,1527,23
802,860,542,708,0.85793,0.81073,1742,25
392,89,326,39,0.77607,0.94872,2067,26
671,140,478,147,0.84728,0.70068,2036,27
482,431,447,357,0.70917,0.83473,2016,28
310,456,314,306,0.71019,0.8366,1503,32
444,1060,412,705,0.75485,0.89645,1703,33
159,771,221,837,0.60181,0.71446,1307,34];
YW29_rho_vnd =[
822,558,590,430,0.87797,0.88605,1750,1
1041,788,659,532,0.87253,0.91729,1974,2
727,440,509,413,0.90963,0.81356,2003,3
480,335,330,308,0.84848,0.85714,2044,6
591,348,534,347,0.7603,0.82421,2032,8
591,348,534,347,0.7603,0.82421,2032,8];
dadl_sog_Neu3 = [
832,1489,712,1270,0.80758,0.85354,1985,1
1322,407,910,770,0.91209,0.44416,2013,2
1234,493,920,779,0.88913,0.53787,2111,3
416,394,390,389,0.77179,0.69666,2000,4
576,307,611,733,0.74795,0.35334,2253,5
2146,644,1979,1778,0.95806,0.31496,2258,6
468,416,480,637,0.8,0.47567,2051,7
2668,1344,1661,1624,0.93016,0.57451,2207,8
850,692,864,1008,0.84144,0.55754,2265,9
647,1663,712,1208,0.76826,0.86507,2103,10
930,1924,851,1441,0.77086,0.90146,2224,11
1143,1394,853,1075,0.84994,0.85395,2099,12
592,33,597,597,0.88442,0.070352,1122,13
944,1089,684,788,0.82164,0.85279,1952,14
1501,987,1617,1759,0.74273,0.41728,2075,15
1576,1597,1024,1106,0.94336,0.90506,2437,16
65,2023,59,1382,0.54237,0.86469,2267,17];
dadl_vn_Mes2 = [
322,331,430,262,0.58837,0.86641,1927,2
252,194,549,187,0.39162,0.78075,1836,3
753,116,789,231,0.67427,0.38528,2032,4
681,203,655,180,0.7542,0.73333,2094,5
591,300,456,217,0.82895,0.85253,1942,6
342,1099,851,1014,0.33255,0.8146,2075,7
1316,949,850,972,0.86941,0.72737,2239,8
861,12,1148,1148,0.55052,0.012195,2037,10
768,194,663,304,0.77225,0.51645,2014,11
711,296,665,633,0.77594,0.43286,2105,12
698,714,563,639,0.78686,0.81064,2003,13];
dadl_rho_vnd = [
1038,1056,878,867,0.75,0.88581,2457,1
884,629,689,682,0.86938,0.83138,2146,2
1514,1170,1275,1212,0.82902,0.81518,1940,3
427,343,438,365,0.79452,0.86575,2140,4
224,1,249,288,0.6988,0.0069444,1177,5
738,503,676,641,0.86834,0.79407,2163,6
1384,862,847,666,0.90909,0.92342,2033,9
1392,876,920,718,0.7,0.91365,2103,10
1122,422,785,462,0.6,0.80952,2132,11
1018,526,700,563,0.89,0.8135,1817,12
918,535,621,529,0.91465,0.84688,2050,13
987,542,637,509,0.92465,0.8723,2379,14
734,310,457,320,0.91904,0.78438,2008,15
763,543,571,472,0.90193,0.81568,2381,16
975,280,765,430,0.8915,0.64186,2499,17
955,719,659,542,0.6,0.84686,2263,18
2180,1285,1500,1396,0.89,0.75287,1909,19
1077,945,804,713,0.84453,0.89481,1781,20
1841,1696,1502,1588,0.84754,0.79345,2027,21
953,756,700,600,0.89286,0.86833,2229,22
1116,933,703,679,0.91038,0.89102,2360,23
1826,1493,1287,1263,0.87413,0.87648,2022,24
136,5,197,197,0.48223,0.015228,995,25
652,588,499,550,0.81363,0.71455,1529,26
1468,738,954,704,0.7,0.84091,2217,27
1069,655,789,590,0.87199,0.83729,2049,28
2098,1396,1534,1464,0.8605,0.79372,2222,29
1037,644,838,667,0.78,0.87556,2325,30
875,684,851,649,0.86016,0.85824,2756,31
1608,1251,1162,935,0.75,0.91444,2290,32
1117,1026,819,758,0.8,0.89182,2427,33
]
% Enhancer Disection Data
SogPxYW_22C = [953 1265 754 848 .81 .90 2280 22; %im 22
674 1012 768 939 .72 .81 2158 21;
1655 1279 1736 1438 .82 .777 2030 20;
1474 261 987 239 .91 .69 1977 19;
883 1560 808 928 0.796 0.93 1967 18;
961 1128 998 1030 .74 0.81 2423 17;
672 68 599 667 0.65 .83 2070 16;
288 946 299 639 0.55 .86 2025 15;
827 1002 900 988 .80 .89 2288 14;
339 1096 872 919 .27 .72 2164 13;
682 1035 555 765 .73 .85 2200 12;
1482 1583 976 948 .88 .93 2110 11;
900 1091 804 795 .65 .81 1542 10;
1416 1673 1052 1098 .88 .94 2136 8;
896 1253 822 996 .77 .90 2605 7;
914 1668 797 1083 .87 .97 2357 6;
1000 1369 665 871 .88 .95 2123 5;
789 985 523 556 .87 .95 2197 3;
888 1012 581 575 .90 .96 2218 1;
1254 1504 730 831 .92 .97 2148 2];
SogPxdl_25C = [665 1772 1031 1244 .71 .93 2331 17;
324 1278 489 902 .67 .91 2061 16;
461 1351 618 878 .71 .96 2250 15;
2151 2251 1779 1695 .92 .93 2154 14;
1949 1282 1912 1467 .90 .74 2213 13;
601 1189 667 718 .76 .95 2172 12;
1481 1766 1550 1427 .87 .90 2123 10;
2109 2397 1945 1877 .94 .90 2142 9;
477 806 471 713 .57 .77 2235 8;
495 1405 720 906 .62 .93 2221 7;
547 1807 822 1193 0.73 0.97 2332 6;
633 1477 652 940 .81 .96 2047 5;
831 2182 977 1297 .75 .96 2272 3;
250 1220 242 801 .69 .90 1793 2;
53 863 868 868 .09 .88 2105 1];
SogPxda_25C = [847 1486 825 949 .82 .96 1681 9;
670 743 576 502 .71 .92 2098 7;
599 1158 658 658 .64 .97 1833 6;
1382 1548 1029 903 .83 .96 1932 5;
879 1668 791 1087 .85 .95 2097 4];
SogSxYW_22C = [948,1771,932,1118,0.70064,0.9347,2267,1;
772,1119,958,1169,0.66910,0.87,2330,2;
1030,1417,850,970,0.776470000000000,0.907220000000000,2176,3;
670,1199,668,797,0.627250000000000,0.843160000000000,2049,5;
961,1168,801,772,0.757800000000000,0.902850000000000,2085,6;
1001,1382,1096,952,0.64507,0.8792,2169,7;
954,1054,970,990,0.68247,0.80707,1998,8;
545,1381,862,1058,0.469840000000000,0.789220000000000,2037,9;
1390,1626,1020,1042,0.842160000000000,0.897310000000000,2207,10;
455,731,582,572,0.546390000000000,0.830420000000000,2158,12;
1266,1107,969,863,0.767800000000000,0.834300000000000,1966,13;
666,798,463,453,0.684670000000000,0.825610000000000,2077,14;
1001,1104,1012,1030,0.696640000000000,0.844660000000000,2042,15;
636,1000,562,566,0.649470000000000,0.869260000000000,930,16;
1336,1600,915,970,0.848090000000000,0.911340000000000,1806,17;
771,887,857,901,0.717620000000000,0.881240000000000,2271,18;
279,356,246,227,0.658540000000000,0.828190000000000,1994,19;
541,792,621,767,0.679550000000000,0.877440000000000,2124,20;
833,1473,1068,1256,0.687270000000000,0.859870000000000,2368,21;
805,949,827,1076,0.623940000000000,0.623610000000000,1911,22;
671,900,776,929,0.601800000000000,0.725510000000000,2029,23;
1115,983,974,837,0.763860000000000,0.879330000000000,1937,24;
136,361,106,225,0.650940000000000,0.813330000000000,1865,26;
1449,1493,1011,992,0.830860000000000,0.920360000000000,2185,27];
SogS3xdl6_25C = [876,1381,984,884,0.708330000000000,0.903850000000000,2420,1;29,951,948,948,0.0316460000000000,0.877640000000000,2051,2;350,548,602,473,0.581400000000000,0.862580000000000,2441,3;265,305,376,229,0.555850000000000,0.816590000000000,1973,4;666,958,858,840,0.664340000000000,0.809520000000000,2275,5;1082,1740,1312,1121,0.724850000000000,0.949150000000000,2259,6;409,912,623,691,0.598720000000000,0.901590000000000,2329,7;690,1336,855,868,0.727490000000000,0.935480000000000,2142,8;269,440,378,370,0.642860000000000,0.770270000000000,2419,9;342,531,451,478,0.658540000000000,0.751050000000000,2281,10;483,822,590,567,0.632200000000000,0.873020000000000,2141,11;241,612,454,461,0.418500000000000,0.765730000000000,2287,12;445,1294,700,1090,0.545710000000000,0.802750000000000,2037,13;519,1168,648,795,0.734570000000000,0.903140000000000,2209,14;1032,2125,1316,1357,0.715050000000000,0.944730000000000,2363,15;473,1319,673,925,0.653790000000000,0.921080000000000,2297,16;555,1506,697,920,0.638450000000000,0.936960000000000,1792,17;363,513,444,434,0.709460000000000,0.790320000000000,1766,18;97,151,104,77,0.548080000000000,0.792210000000000,2408,19;837,1938,969,1070,0.668730000000000,0.916820000000000,2280,20;1068,1425,1243,989,0.803700000000000,0.922140000000000,2197,21;651,1390,920,959,0.693480000000000,0.936390000000000,2151,22;227,736,366,450,0.407100000000000,0.811110000000000,1997,23;242,521,365,387,0.427400000000000,0.806200000000000,2411,24;]
% ----------- Temperature Perturbation Data ----------------- %
Data = {
sort( SogPxYW_22C(:,6) );
sort( YW29_sog_Neu3(:,5) );
sort( YW29_sog_Neu3(:,6) );
sort( YW29_rho_vnd(:,5) );
sort( YW29_rho_vnd(:,6) );
sort( YW29_vn_Mes2(:,5) );
sort( YW29_vn_Mes2(:,6) );
};
gene_names = {'sog 22C'; 'sog 29C'; 'Neu3 29C'; 'rho 29C';
'vnd 29C'; 'vn 29C'; 'Mes2 29C'};
% ----------------============================-----------------%
%%
A = YW29_sog_Neu3(:,5) ; %SogSxYW_22C(:,5)./SogSxYW_22C(:,6);
B = YW29_sog_Neu3(:,6) ; %SogPxYW_22C(:,5)./SogPxYW_22C(:,6);
C = YW29_vn_Mes2(:,5);
figure(2); clf; colordef black; set(gcf,'color','k');
x = linspace(0,1.1,8);
hist(A,x); hold on;
h = findobj(gca,'type','patch');
set(h,'FaceColor','r','EdgeColor','none');
hist(B,x)
hist(C,x);
alpha(.6);
xlim([0,1]);
xlabel('Fraction activated nuclei','FontSize',15);
ylabel('Frequency','FontSize',15);
set(gca,'FontSize',15);
legend('Sog','Neu3','rho','Location','NorthWest');
xx = linspace(0,1,100);
% gA = gaussfit(xx,A);
% gB = gaussfit(xx,B);
% gC = gaussfit(xx,C);
% gD = gaussfit(xx,YW29_rho_vnd(:,5));
gA = gamma(
figure(5); clf; colordef white; set(gcf,'color','w');
plot(xx,gA);
hold on; plot(xx,gB,'r');
plot(xx,gC,'g');
plot(xx,gD,'c');
%%
A = SogPxYW_22C(:,3)./SogPxYW_22C(:,4);
B = SogPxdl_25C(:,3)./SogPxdl_25C(:,4);
figure(3); clf; colordef black;
set(gcf,'color','k')
x = linspace(0,1,7);
hist(A,x); hold on;
h = findobj(gca,'type','patch');
set(h,'FaceColor','r','EdgeColor','none');
hist(B,x)
alpha(.6);
xlim([0,1.1]);
xlabel('Fraction of domain match','FontSize',15);
ylabel('Frequency','FontSize',15);
set(gca,'FontSize',15);
legend('SogP Wildtype','SogP Stressed','Location','NorthWest');
%%
% gene_names = {'P-YW:End ratio'; 'P-dl:End ratio'; 'S-YW: End ratio';
% 'S-dl:End ratio';'P YW 22 domain';'P dl 25 domain'; 'S YW 22 domain';'S dl 25 domain'};
%---
% %------------
% Data = {
% sort(SogPxYW_22C(:,6));
% sort(SogPxdl_25C(:,6));
% sort( SogPxYW_22C(:,5)./SogPxYW_22C(:,6) );
% sort( SogPxdl_25C(:,5)./SogPxdl_25C(:,6) );
% sort( SogSxYW_22C(:,6) );
% sort( SogSxYW_22C(:,5)./SogSxYW_22C(:,6) );
% };
%
%
% gene_names = {'Endgonous YW P'; 'Endogenous dl';
% 'P-YW:End ratio'; 'P-dl:End ratio';'End YW S';'S-YW: End ratio' };
% %--------
G = length(Data);
% rescale
embs = sum(cellfun('size', Data,1)) ;
L0 = 100;
DA = zeros(G,L0-1);
for g=1:G
for i=1:L0-1
k= 1+floor(length(Data{g})*i/L0);
DA(g,i) = Data{g}(k);
end
end
sat = 1;% 1.4;
DA(DA>sat) = sat; % saturate to account for different strength signals that merge due to lack of resolution
% sort by asynchrony score
asyncT = 1;% 1; % .8
Dt = DA; Dt(DA>asyncT)=NaN;
sv = nanmean(Dt,2);
DAs = sortrows([sv,DA]);
gs = sortrows([sv,(1:G)']) ;
gn = gene_names(gs(:,2));
gene_names2 = [num2cell(sv),gene_names];
D = DAs(:,2:end);
C = colormap(1-hot(256));
C = [ones(round(.3*256),3); C; zeros(round(.1*256),3)];
F=18;
%
figure(2); clf; imagesc(D); figure(2);
colorbar; colordef white;
set(gcf,'color','w');
set(gca,'YtickLabel',...
str2mat(gn{:}),...
'YTick',[1:G],'fontsize',3/4*F,...
'YMinorTick','on');
xlabel('percent of embryos','Fontsize',F);
colormap(C);
colordef black; set(gcf,'color','k');
figure(4); clf; colordef black; set(gcf,'color','k');
C2 = colormap(hsv(G));
for g=1:G
plot(D(g,:),'color',C2(g,:)); hold on;
end
colordef black; set(gcf,'color','k');
legend(gn,'Location','Best');
set(gca,'FontSize',F);
H = zeros(G,G); P = zeros(G,G);
for i=1:G
for j=1:G
[H(i,j),Pt(i,j)] = ttest2(D(i,:),D(j,:));
end
Pt(i,i) = 1;
end
figure(11); clf; imagesc(log(Pt));
set(gca,'YtickLabel', str2mat(gn{:}),'YTick',[1:G],'YMinorTick','off','fontsize',14);
set(gca,'XtickLabel', str2mat(gn{:}),'XTick',[1:G],'XMinorTick','off','fontsize',14);
colorbar; colormap(winter);
colordef black; set(gcf,'color','k');
%
% snaS_YW=[1068,1106,33,71,1,1
% 653,716,13,76,2,1
% 1187,1193,40,46,3,1
% 1001,977,35,11,4,1
% 1066,1082,42,58,5,1
% 661,679,6,24,2,4
% 992,1018,23,49,3,4];
% % [LacZ,real sna, in LacZ not sna,in sna not LacZ, im num, shadow line]
%
% snaS_dl6=[1336,1235,107,6,2
% 850,806,44,0,4
% 1060,896,199,35,5
% 588,544,47,3,6
% 972,939,35,2,7
% 935,893,51,9,8];
% % [real sna, LacZ, in sna not LacZ, in LacZ not sna, im num,]