forked from lawrennd/GPmat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drosPlotEvaluation.m
205 lines (178 loc) · 5.64 KB
/
drosPlotEvaluation.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
% DROSPLOTEVALUATION Plot the accuracy figures appearing in the paper
% FORMAT
% DESC Plot the accuracy figures appearing in the paper
%
% COPYRIGHT : Antti Honkela, 2009
% SHEFFIELDML
tfnames = {'twi', 'mef2'};
FONTSIZE = 7;
styles = {'bo-', 'rd--', 'm*--', 'gs--', 'k--'};
t = [20, 100, 250];
rankings = {};
for k=1:length(tfnames),
tf = tfnames{k};
if exist('INCLUDE_TSNI') && INCLUDE_TSNI,
rankings{k} = {indrank.(tf), disimrank.(tf), tsnirank.(tf), mutarank.(tf), corrrank.(tf)};
nonmutarankings{k} = {indrank.(tf), disimrank.(tf), tsnirank.(tf), [], corrrank.(tf)};
INCLUDE_EXTRA=1;
EXTRA_LABEL={'Multiple-target GP', 'TSNI'};
elseif exist('INCLUDE_ODE') && INCLUDE_ODE,
rankings{k} = {indrank.(tf), oderank.(tf), tsnirank.(tf), mutarank.(tf), corrrank.(tf)};
nonmutarankings{k} = {indrank.(tf), oderank.(tf), tsnirank.(tf), [], corrrank.(tf)};
INCLUDE_EXTRA=1;
EXTRA_LABEL={'Single-target quadrature', 'TSNI'};
else
rankings{k} = {indrank.(tf), disimrank.(tf), oderank.(tf), mutarank.(tf), corrrank.(tf)};
nonmutarankings{k} = {indrank.(tf), disimrank.(tf), oderank.(tf), [], corrrank.(tf)};
INCLUDE_EXTRA=0;
EXTRA_LABEL='';
end
end
clear accs;
clear pvals;
figure(1);
for k=1:2,
if INCLUDE_EXTRA,
subplot(3, 4, 2*k-1);
else
subplot(3, 5, 2*k-1);
end
tf = tfnames{k};
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(...
rankings{k}, ...
chip_validation.(tf), t, styles, [], drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Global ChIP: %s', tfnames{k}), 'FontSize', FONTSIZE);
xlabel('Top N to consider', 'FontSize', FONTSIZE);
if k==1,
ylabel('Relative enrichment (%)', 'FontSize', FONTSIZE);
end
end
clear accs;
clear pvals;
for k=1:2,
if INCLUDE_EXTRA,
subplot(3, 4, 3+2*k);
else
subplot(3, 5, 4+2*k);
end
tf = tfnames{k};
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(...
nonmutarankings{k}, ...
mutant_validation.(tf), t, styles, [], drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Global knock-outs: %s', tfnames{k}), 'FontSize', FONTSIZE);
xlabel('Top N to consider', 'FontSize', FONTSIZE);
if k==1,
ylabel('Relative enrichment (%)', 'FontSize', FONTSIZE);
end
end
clear accs;
clear pvals;
for k=1:2,
if INCLUDE_EXTRA,
subplot(3, 4, 2*k);
else
subplot(3, 5, 2*k);
end
tf = tfnames{k};
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(...
rankings{k}, ...
chip_validation.(tf), t, styles, 1, drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Focused ChIP: %s', tfnames{k}), 'FontSize', FONTSIZE);
xlabel('Top N to consider', 'FontSize', FONTSIZE);
end
clear accs;
clear pvals;
for k=1:2,
if INCLUDE_EXTRA,
subplot(3, 4, 4+2*k);
else
subplot(3, 5, 5+2*k);
end
tf = tfnames{k};
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(...
nonmutarankings{k}, ...
mutant_validation.(tf), t, styles, 1, drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Focused knock-outs: %s', tfnames{k}), 'FontSize', FONTSIZE);
xlabel('Top N to consider', 'FontSize', FONTSIZE);
end
if INCLUDE_EXTRA,
subplot(3, 4, [10, 11]);
bar(rand(length(rankings{1})));
else
subplot(3, 5, [5, 10]);
bar(rand(length(rankings{1})));
end
hold on
plot(1:2, 1:2, 'k-.');
plot(1:2, 1:2, 'k--');
axis([-10 -9 -10 -9]);
set(gca, 'FontSize', FONTSIZE);
axis off
if INCLUDE_EXTRA,
legend('Single-target GP', EXTRA_LABEL{:}, ...
'Knock-outs', 'Correlation', 'Filtered', 'Random', 'Location', 'North');
else
legend(sprintf('Single-target GP'), sprintf('Multiple-target GP'), ...
sprintf('Single-target\nquadrature'), 'Knock-outs', ...
'Correlation', 'Filtered', 'Random', 'Location', 'West');
end
set(gca, 'FontSize', FONTSIZE);
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 20 18])
hold off
if ~INCLUDE_EXTRA,
figure(2);
tf = 'twi';
clear accs;
clear pvals;
rankings = {indrank.(tf), ssrank.(tf)};
subplot(2, 3, 1);
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(rankings, ...
chip_validation.(tf), t, styles, [], drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Global ChIP: %s', tf));
xlabel('Top N to consider');
ylabel('Relative enrichment (%)');
subplot(2, 3, 2);
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(rankings, ...
mutant_validation.(tf), t, styles, [], drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Global knock-outs: %s', tf));
xlabel('Top N to consider');
%ylabel('Relative enrichment (%)');
subplot(2, 3, 4);
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(rankings, ...
chip_validation.(tf), t, styles, 1, drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Focused ChIP: %s', tf));
xlabel('Top N to consider');
ylabel('Relative enrichment (%)');
subplot(2, 3, 5);
[accs(:, :, k), pvals(:, :, k)] = drosPlotAccuracyBars(rankings, ...
mutant_validation.(tf), t, styles, 1, drosexp, drosinsitu);
set(gca, 'FontSize', FONTSIZE);
title(sprintf('Focused knock-outs: %s', tf));
xlabel('Top N to consider');
%ylabel('Relative enrichment (%)');
subplot(2, 3, [3,6]);
bar(rand(length(rankings)));
hold on
plot(1:2, t(1:2), 'k--');
plot(1:2, 1:2, 'k-.');
axis([-10 -9 -10 -9]);
set(gca, 'FontSize', FONTSIZE);
axis off
legend('n=12', 'n=7', ...
'Random', 'Filtered', 'Location', 'West');
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 9.65 9.65])
%set(gcf, 'PaperSize', [20 20])
%set(gcf, 'PaperPosition', [0 0 8.7 8.7])
hold off
end