forked from lawrennd/GPmat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drosPlotEvaluationFull.m
212 lines (180 loc) · 5.54 KB
/
drosPlotEvaluationFull.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
% DROSPLOTCHIPDISTANCES Plot the accuracy figures appearing in the paper
% FORMAT
% DESC Plot the accuracy figures appearing in the paper
%
% COPYRIGHT : Antti Honkela, 2009
% SHEFFIELDML
tfnames = drosTF.names;
FONTSIZE = 8;
styles = {'bo-', 'rd--', 'm*--', 'gs--', 'k--'};
t = [20, 100, 250];
rankings = {};
for k=1:length(tfnames),
tf = tfnames{k};
nonmutarankings{k} = {indrank.(tf), [], corrrank.(tf)};
if isfield(mutarank, tf),
rankings{k} = {indrank.(tf), mutarank.(tf), corrrank.(tf)};
else
rankings{k} = nonmutarankings{k};
end
end
clear accs;
clear pvals;
figure(1);
for k=1:length(tfnames),
subplot(3, length(tfnames), k); %3*(k-1)+2);
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}));
xlabel('Top N to consider');
if k==1,
ylabel('Relative enrichment (%)');
end
end
clear accs;
clear pvals;
for k=1:length(tfnames),
subplot(3, length(tfnames), length(tfnames)+k);
tf = tfnames{k};
if isfield(mutant_validation, tf),
[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}));
xlabel('Top N to consider');
if k==1,
ylabel('Relative enrichment (%)');
end
end
end
subplot(3, length(tfnames), 3*length(tfnames)-[1, 0]);
if exist('INCLUDE_TSNI') && INCLUDE_TSNI,
bar(rand(5));
else
bar(rand(length(rankings{1})));
end
hold on
plot(1:2, t(1:2), 'k--');
axis([-10 -9 -10 -9]);
set(gca, 'FontSize', FONTSIZE);
axis off
if exist('INCLUDE_TSNI') && INCLUDE_TSNI,
legend('Single-target models', 'Multiple-target models', 'TSNI', ...
'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
else
legend('Single-target models', ... %'Multiple-target models', ...
'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
end
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 17.4 18])
hold off
clear accs;
clear pvals;
figure(2);
for k=1:length(tfnames),
subplot(3, length(tfnames), k); %3*(k-1)+2);
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}));
xlabel('Top N to consider');
if k==1,
ylabel('Relative enrichment (%)');
end
end
clear accs;
clear pvals;
for k=1:length(tfnames),
subplot(3, length(tfnames), length(tfnames)+k);
tf = tfnames{k};
if isfield(mutant_validation, tf),
[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}));
xlabel('Top N to consider');
if k==1,
ylabel('Relative enrichment (%)');
end
end
end
subplot(3, length(tfnames), 3*length(tfnames)-[1, 0]);
if exist('INCLUDE_TSNI') && INCLUDE_TSNI,
bar(rand(5));
else
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 exist('INCLUDE_TSNI') && INCLUDE_TSNI,
legend('Single-target models', 'Multiple-target models', 'TSNI', ...
'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
else
legend('Single-target models', ... %'Multiple-target models', ...
'Knock-outs', 'Correlation', 'Random', 'Location', 'North');
end
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [20 20])
set(gcf, 'PaperPosition', [0 0 17.4 18])
hold off
% figure(3);
% 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(2));
% 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