-
Notifications
You must be signed in to change notification settings - Fork 0
/
pvalgraph.m
66 lines (63 loc) · 2.71 KB
/
pvalgraph.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
corfac = 1; %sum(~isnan(pvals.CCLE_AUC));
idxsel = ~isnan(pvals.CCLE_AUC);
[sortedpvals, idxsort] = sort(-log10(pvals.CCLE_AUC(idxsel)));
sortedpvals(sortedpvals>30) = 30;
fHand = figure;
aHand = axes('parent', fHand);
hold(aHand, 'on')
thpval = 0.05;
disp('CCLE');
numred = sum(sortedpvals < -log10(thpval/corfac));
numblue = sum(sortedpvals > -log10(thpval/corfac));
fprintf('Validated = %d/%d\n', numblue, numred+numblue);
h1 = bar(1:numred, sortedpvals(sortedpvals < -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'r');
h2 = bar(numred+1:numred+numblue, sortedpvals(sortedpvals >= -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'b');
labels = pvals.DRUG_NAME(idxsel);
set(gca, 'XTickLabel', labels(idxsort))
set(gca, 'XTick', 1:length(sortedpvals))
set(gca, 'XTickLabelRotation', 45);
ylabel('-log_{10}(p-value)');
title('Rank sum test for validation on CCLE');
legend('P-value > 0.05', 'P-value <=0.05');
corfac = 1; %sum(~isnan(pvals.CCLE_AUC));
idxsel = ~isnan(pvals.CTRP_AUC);
[sortedpvals, idxsort] = sort(-log10(pvals.CTRP_AUC(idxsel)));
sortedpvals(sortedpvals>30) = 30;
fHand = figure;
aHand = axes('parent', fHand);
hold(aHand, 'on')
thpval = 0.05;
numred = sum(sortedpvals < -log10(thpval/corfac));
numblue = sum(sortedpvals > -log10(thpval/corfac));
disp('CTRP');
fprintf('Validated = %d/%d\n', numblue, numred+numblue);
h1 = bar(1:numred, sortedpvals(sortedpvals < -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'r');
h2 = bar(numred+1:numred+numblue, sortedpvals(sortedpvals >= -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'b');
labels = pvals.DRUG_NAME(idxsel);
set(gca, 'XTickLabel', labels(idxsort))
set(gca, 'XTick', 1:length(sortedpvals))
set(gca, 'XTickLabelRotation', 45);
ylabel('-log_{10}(p-value)');
title('Rank sum test for validation on CTRP');
legend('P-value > 0.05', 'P-value <=0.05');
corfac = 1; %sum(~isnan(pvals.CCLE_AUC));
idxsel = ~isnan(pvals.GDSC_AUC);
[sortedpvals, idxsort] = sort(-log10(pvals.GDSC_AUC(idxsel)));
sortedpvals(sortedpvals>30) = 30;
fHand = figure;
aHand = axes('parent', fHand);
hold(aHand, 'on')
thpval = 0.05;
numred = sum(sortedpvals < -log10(thpval/corfac));
numblue = sum(sortedpvals > -log10(thpval/corfac));
disp('GDSC');
fprintf('Validated = %d/%d\n', numblue, numred+numblue);
h1 = bar(1:numred, sortedpvals(sortedpvals < -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'r');
h2 = bar(numred+1:numred+numblue, sortedpvals(sortedpvals >= -log10(thpval/corfac)), 'parent', aHand, 'Facecolor', 'b');
labels = pvals.DRUG_NAME(idxsel);
set(gca, 'XTickLabel', labels(idxsort))
set(gca, 'XTick', 1:length(sortedpvals))
set(gca, 'XTickLabelRotation', 45);
ylabel('-log_{10}(p-value)');
title('Rank sum test for validation on GDSC');
legend('P-value > 0.05', 'P-value <=0.05');