-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_suspect_A2.m~
executable file
·79 lines (61 loc) · 2.05 KB
/
run_suspect_A2.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
%Compute suspect zscores on A2
cells = {'A375','A549','HT29','HEPG2','HCC515','HA1E','MCF7','PC3','VCAP'};
susp_cutoff = 5;
close all
figure(1); ax1 = gca;
figure(2); ax2 = gca;
figure(3); ax3 = gca;
for ii = 1:length(cells)
this_susp = parse_gctx(strtrim(ls(fullfile('/cmap/users/jnasser/dpeak_v2/data/A2_suspect_matrices/',sprintf('%s*SUSP*.gctx',cells{ii})))));
this_brew = parse_gctx(strtrim(ls(fullfile('/cmap/users/jnasser/dpeak_v2/data/A2_suspect_matrices/',sprintf('%s*BREW*.gctx',cells{ii})))));
%[f,x] = ecdf(this_susp.mat(:));
figure(1)
[~,~,x,f] = kde(this_susp.mat(:),2^10,0,50);
plot(ax1,x,f,'DisplayName',cells{ii});
hold on
%cells(ii)
%describe(this_susp.mat)
[this_susp_per_sig,this_susp_per_sig_in_gene_set] = run_single_susp(this_brew,this_susp,susp_cutoff,cells{ii},'mkfig',false);
figure(2)
[~,~,x,f] = kde(this_susp_per_sig,2^10,0,200);
plot(ax2,x,f,'DisplayName',cells{ii});
hold on
figure(3)
[~,~,x,f] = kde(this_susp_per_sig_in_gene_set,2^10,0,100);
plot(ax3,x,f,'DisplayName',cells{ii});
hold on
end
figure(1)
xlabel('Suspisciousness')
ylabel('cdf')
title(sprintf('CDF of suspect z-scores \n cutoff = %d',susp_cutoff))
ax = gca;
ax.YLim = [0 1];
ax.YTick = [.8 .85 .9:.025:1];
grid on
legend show
namefig('A2_susp_cdf')
figure(2)
title(sprintf('CDF of suspect z-scores per signature \n cutoff = %d',susp_cutoff))
grid on
xlabel('Suspect genes per sample')
ylabel('cdf')
legend show
ax = gca;
ax.YTick = [0 .2 .4 .5 .6 .8 1];
namefig('A2_susp_per_sig_cdf')
figure(3)
title(sprintf('CDF of suspect z-scores per signature in gene set \n cutoff = %d',susp_cutoff))
xlabel('Suspect genes per sample in gene set')
ylabel('cdf')
grid on
legend show
ax = gca;
ax.YTick = [0 .2 .4 .5 .6 .8 1];
namefig('A2_susp_per_sig_gene_set_cdf')
%savefigures('mkdir',false,'out','/cmap/users/jnasser/dpeak_v2/fig/A2_suspect','overwrite',true)
% legend show
% grid on
% title('A2 CDF of suspect Z-scores. Compounds with 3 replicates')
% ax = gca;
% ax.YTick = [0:.1:.9 .91:.01:1]