forked from lawrennd/GPmat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drosPlotChipDistances.m
100 lines (90 loc) · 2.8 KB
/
drosPlotChipDistances.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
% DROSPLOTCHIPDISTANCES Plot the ChIP binding site distance figures appearing in the paper
% FORMAT
% DESC Plot the ChIP binding site distance figures appearing in the paper
%
% COPYRIGHT : Antti Honkela, 2009
% SHEFFIELDML
drosLoadData;
demRunRankings;
%clear r;
t = [100, 250];
tfnames = {'twi', 'mef2'};
defaultorder = get(0, 'DefaultAxesColorOrder');
v = colormap;
%set(0, 'DefaultAxesColorOrder', [v([1, 22, 43, 64], :); 0, 0, 0]);
set(0, 'DefaultAxesColorOrder', [v([1, 17, 33, 48, 64], :); 0, 0, 0]);
set(0,'DefaultAxesLineStyleOrder',{'-','-','-','-','-',':'})
if ~exist('r'),
for k=1:2,
for l=1:2,
tf = tfnames{l};
r(k).(tf) = drosComputeChipDistanceCurve(chipdistances, drosexp, drosinsitu, {indrank.(tf), disimrank.(tf), oderank.(tf), mutarank.(tf), corrrank.(tf)}, t(k), tf);
end
end
end
if ~exist('r_focus'),
for k=1:2,
for l=1:2,
tf = tfnames{l};
r_focus(k).(tf) = drosComputeChipDistanceCurve(chipdistances, drosexp, drosinsitu, {indrank.(tf), disimrank.(tf), oderank.(tf), mutarank.(tf), corrrank.(tf)}, t(k), tf, 1);
end
end
end
FONTSIZE = 7;
rs = {r, r_focus};
labels = {'Global', 'Focused'};
figure(1);
j=1;
k=2;
for l=1:2,
tf = tfnames{l};
subplot(2, 2, l);
semilogx(10.^[1:.1:6], 100*rs{j}(k).(tf))
axis([10, 1e6, 0, 100])
set(gca, 'FontSize', FONTSIZE);
set(gca, 'XTick', 10.^[1:6]);
title(sprintf('%s ChIP: %s, Top-%d', labels{j}, tf, t(k)))
xlabel('Distance to CRM (bp)')
if l==1,
ylabel('Relative enrichment (%)')
end
end
subplot(2, 2, 3:4);
plot(1:.1:6, 100*r(k).(tf))
axis off
set(gca, 'FontSize', FONTSIZE);
axis([10 11 0 1]);
legend('Single-target GP', 'Multiple-target GP', 'Single-target quadrature', 'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 8.7 8.7])
figure(2);
for j=1:2,
for k=1:2,
for l=1:2,
tf = tfnames{l};
subplot(3, 4, 4*(k-1)+j+2*(l-1));
semilogx(10.^[1:.1:6], 100*rs{j}(k).(tf))
axis([10, 1e6, 0, 100])
set(gca, 'FontSize', FONTSIZE);
set(gca, 'XTick', 10.^[1:6]);
title(sprintf('%s ChIP: %s, Top-%d', labels{j}, tf, t(k)))
%xlabel('Genomic distance to closest ChIP binding site (bp)')
xlabel('Distance to CRM (bp)')
if l==1 && j==1,
ylabel('Relative enrichment (%)')
end
end
end
subplot(3, 4, 10:11);
plot(1:.1:6, 100*r(k).(tf))
axis off
set(gca, 'FontSize', FONTSIZE);
axis([10 11 0 1]);
legend('Single-target GP', 'Multiple-target GP', 'Single-target quadrature', 'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 17.4 18])
end
set(0, 'DefaultAxesColorOrder', defaultorder);
set(0,'DefaultAxesLineStyleOrder',{'-'})