-
Notifications
You must be signed in to change notification settings - Fork 0
/
summaryPlotZTPreference.m
53 lines (48 loc) · 1.07 KB
/
summaryPlotZTPreference.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
warning off
folder = 'G:\DATA\';
files = dir('G:\DATA\*1057*_TM.mat');
nFiles = length(files);
nRows = floor(sqrt(nFiles));
nColumns = ceil(nFiles/nRows);
sigFrac = zeros(nFiles, 2);
figure
for iFile = 1:nFiles
fprintf('Analyzing file %d/%d\n', iFile, nFiles)
load(fullfile(folder, files(iFile).name));
subplot(nRows, nColumns, iFile);
[sigFrac(iFile, :), auroc{iFile}] = TM.rocAnalysisTmp;
drawnow;
end
return
%%
figure
plot(sigFrac(:,1), sigFrac(:,2), 'o');
hold on;
plot([0, 1], [0, 1], 'k:');
axis equal tight
box off
xlabel('Full Data');
ylabel('Residuals');
title('Fraction of cells with significant AUROC');
set(gca, 'XTick', [0 0.5 1], 'YTick', [0 0.5 1]);
warning on
%%
figure
aurocMat = cell2mat(auroc(:));
plot(aurocMat(:,1), aurocMat(:,2), '.');
hold on;
plot([0, 1], [0, 1], 'k:');
axis equal
xlim([0 1]);
ylim([0 1]);
set(gca, 'XTick', [0 0.5 1], 'YTick', [0 0.5 1]);
xlabel('Full Data AUROC');
ylabel('Residuals AUROC');
box off
figure;
histogram(aurocMat(:,1));
hold on;
histogram(aurocMat(:,2));
legend('Full data', 'Residuals');
xlabel('AUROC');
box off