Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SciRep2020-Data-and-Files/HOV_Trial.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
348 lines (296 sloc)
17.5 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% HOV_Trial.m | |
% HOV Trial Human ADI (Matei) | |
% Aug. 7, 2015 - Dec. 16, 2016 | |
agarcomp = input('Compensate agar for HOV? (0/1)'); | |
drug(1) = {'dmso'}; | |
drug(2) = {'carb'}; | |
drug(3) = {'tax+carb'}; | |
drug(4) = {'tax'}; | |
Ndrug = length(drug); | |
% patcoc.num = empty | |
% patcoc.class(1) = Binary Resist/Sens [1 5 6 9 11 14 16 17 18 19 | |
% 20 22 23] [2 4 7 8 10 12 13 15 21] | |
% [21 2 10 19 8 12 4 6 3 7] [ | |
pat(1) = {'hov5'}; patcoc(1) = 1; patreg(1) = {'CT'}; % S | |
pat(2) = {'hov7'}; patcoc(2) = -1; patreg(2) = {'clear'}; % S clear cell | |
pat(3) = {'hov8'}; patcoc(3) = -1; patreg(3) = {'CT'}; % R | |
pat(4) = {'hov8b'}; patcoc(4) = -1; patreg(4) = {'met'}; % met 8 | |
pat(5) = {'hov9'}; patcoc(5) = 1; patreg(5) = {'met'}; % met | |
pat(6) = {'hov10'}; patcoc(6) = 1; patreg(6) = {'CT'}; % S | |
pat(7) = {'hov11'}; patcoc(7) = 1; patreg(7) = {'met'}; % met | |
pat(8) = {'hov12'}; patcoc(8) = 1; patreg(8) = {'met'}; % met | |
pat(9) = {'hov13'}; patcoc(9) = 1; patreg(9) = {'CT'}; % S | |
pat(10) = {'hov14'}; patcoc(10) = -1; patreg(10) = {'clear'}; % R | |
pat(11) = {'hov15'}; patcoc(11) = 1; patreg(11) = {'CT'}; % S | |
pat(12) = {'hov16'}; patcoc(12) = -1; patreg(12) = {'CT'}; % R | |
pat(13) = {'hov17'}; patcoc(13) = -1; patreg(13) = {'CT'}; % R | |
pat(14) = {'hov18a'}; patcoc(14) = 1; patreg(14) = {'CT'}; % S | |
pat(15) = {'hov18b'}; patcoc(15) = 1; patreg(15) = {'met'}; % met 18 | |
pat(16) = {'hov20'}; patcoc(16) = 1; patreg(16) = {'CT'}; % S | |
pat(17) = {'hov20b'}; patcoc(17) = 1; patreg(17) = {'met'}; % met 20 | |
pat(18) = {'hov22'}; patcoc(18) = 1; patreg(18) = {'CT'}; % S | |
pat(19) = {'hov23'}; patcoc(19) = 1; patreg(19) = {'CT'}; % S | |
pat(20) = {'hov25'}; patcoc(20) = 1; patreg(20) = {'CT'}; % S | |
pat(21) = {'hov26'}; patcoc(21) = 1; patreg(21) = {'met'}; % met | |
pat(22) = {'hov30'}; patcoc(22) = 1; patreg(22) = {'CT'}; % S | |
pat(23) = {'hov31'}; patcoc(23) = 1; patreg(23) = {'CT'}; % S | |
%pat(21) = {'hov27'}; patcoc(21) = -1; | |
%pat(24) = {'hov29'}; patcoc(24) = 0; % no cancer | |
%pat(25) = {'hov19'}; patcoc(25) = 0; % withdrawn | |
%pat(26) = {'hov21'}; patcoc(26) = 0; % withdrawn | |
%pat(27) = {'hov24'}; patcoc(27) = 0; % no platinum | |
%pat(28) = {'hov28'}; patcoc(28) = 0; % withdrawn | |
testvec = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]; | |
NpatTrial = length(pat); | |
% %%% Partial Outcome Set | |
% patind(2).num = [2 3 4 10 12 13]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 5 6 7 8 9 11]; patind(3).class = {'Sens'}; % sens | |
%%% Partial Outcome Set (flip hov9) | |
% patind(2).num = [2 3 4 10 12 13]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 6 7 8 9 11]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = 5; patind(4).class = {'Test'}; | |
%%% Ordered Full Set | |
% patind(2).num = [2 13 14 16 19 24 25 10]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [3 4 5 6 7 8 23 12 1 9 11 17 18 20 21 22]; patind(3).class = {'Sens'}; % sens | |
%%% Self-ordered Clean Set | |
% patind(2).num = [2 10 12 13 14 15 16 18 19 24 25]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [3 4 5 6 7 8]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [9 11 17 20 21 22 23]; patind(4).class = {'Test'}; | |
%%% Full Set | |
% patind(2).num = [2 13 14 16 19 24 25]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 3 4 5 6 7 8 9 10 11 12 15 17 18 20 21 22 23]; patind(3).class = {'Sens'}; % sens | |
%%% First Set | |
% patind(2).num = [2 6]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 3 4 5 7 8]; patind(3).class = {'Sens'}; % sens | |
%%% Second Set | |
% patind(2).num = [13 14 16 19 24 25]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [9 10 11 12 15 17 18 20 21 22 23]; patind(3).class = {'Sens'}; % sens | |
%%% Immobilization set | |
% patind(2).num = [1 2 3 4 5 6 7 8]; patind(2).class = {'Resist'}; % resist [10 12 3 4 21 5 8 7] | |
% patind(3).num = [9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25]; patind(3).class = {'Sens'}; % sens | |
% Outcome based | |
% patind(2).num = [2 3 12 13]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [5 6 7 8 9]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [17 20 25 4 11 14 15 16 23 24 10 18 21 22]; patind(4).class = {'Test'}; | |
% 12/1/18 set | |
% patind(2).num = [2 3 4 10 12 13 24]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 5 6 7 8 9 11 14 15 17 19 20 23]; patind(3).class = {'Sens'}; % sens | |
% patind(2).num = [10 12 13 24]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [9 11 14 15 17 19 20 23]; patind(3).class = {'Sens'}; % sens | |
% patind(2).num = [2 3 4 10 12 13 5]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 6 7 8 9 11]; patind(3).class = {'Sens'}; % sens | |
% 12/5/18 Current best classification | |
% patind(2).num = [2 3 4 10 12 13 21]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 6 7 8 9 14 19 23]; patind(3).class = {'Sens'}; % sens | |
% % patind(4).num = [24 5 11 17 20]; patind(4).class = {'Test'}; % sens | |
% TClass = 0; | |
% PClass = 0; | |
% Held out: 1 12 14 15 17 | |
% 12/5/18 Full set | |
% patind(2).num = [2 3 10 12 13 24 4]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [5 6 7 8 9 11 14 15 17 19 20 23]; patind(3).class = {'Sens'}; % sens | |
% Held out: 1 | |
% 12/1/18 set for 3-class | |
% patind(2).num = [2 3 10 13 24]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [5 11 12 17 20]; patind(3).class = {'Mid'}; % sens | |
% patind(4).num = [4 6 7 8 9 14 19 23]; patind(4).class = {'Sens'}; % sens | |
% Outliers: 5 9 | |
% % 9/16/19 Test Set | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [2 3 10 12 4 7 8 17]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [15 5 21 9 11 14 16 18 19 20 22 23 24]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [2 3 10 12 4 7 24]; patind(4).class = {'Test'}; % sens | |
% %patind(4).num = [2 3 10 12 4 7 8 17 15 5 21 9 11 14 16 18 19 20 22 23 1 6 13]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% | |
% 9/16/19 Full Set | |
% patind(1).descrip = {'Full Set'}; | |
% patind(2).num = [2 3 4 10 12 13 21]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 5 6 7 8 9 11 14 15 16 17 18 19 20 22 23]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [13 6 8]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% 9/16/19 Agar versus Poly-L | |
% patind(1).descrip = {'Agar vs Poly'}; | |
% patind(2).num = [1 2 3 4 5 6 7 8]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [9 10 11 12 13 14 15 16 17 18 20 21 22 23]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [1 9 19]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% 9/16/19 Poly Set | |
% patind(1).descrip = {'Poly Set'}; | |
% patind(2).num = [10 12 13 21]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [19 20 15 16 9 11 14 17 18 22 23]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [1 2 3 4 5 6 7 8]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% 9/28/19 Met Set | |
% patind(1).descrip = {'Met Set'}; | |
% patind(2).num = [2 4 7 8 10 12 13 15 21]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [1 5 6 9 11 14 16 17 18 19 20 22 23]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [13 6 8]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 0; % Predict the third class | |
% 9/28/19 Clean Set | |
% patind(1).descrip = {'Clean Set'}; | |
% patind(2).num = [3 4 5 2 12 10 11 15 18 20 21 23 9]; patind(2).class = {'Resist'}; % resist | |
% patind(3).num = [7 8 22 14 17]; patind(3).class = {'Sens'}; % sens | |
% patind(4).num = [13 1 6 7 8 16 19]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% % 2/12/20 Test Set for HOV paper | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [21 3 4 5 7 8]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [1 2 15 17 23 9 14 18 11 20 16 19 22]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [6 10 12 13]; patind(4).class = {'Test'}; % sens | |
% %patind(4).num = testvec; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% % 2/13/20 Test Set | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [12 10 21]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [15 24 23 9 14 18 11 19 20 16 22]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [1 6 13]; patind(4).class = {'Test'}; % sens | |
% %patind(4).num = [2 3 10 12 4 7 8 17 15 5 21 9 11 14 16 18 19 20 22 23 1 6 13]; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 0; % Predict the third class | |
% Poly immob set 3/3/20 | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [10 12 21 15 13]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [17 23 9 14 18 19 11 20 16 22]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [9 13 19]; patind(4).class = {'Test'}; % sens | |
% %patind(4).num = testvec; patind(4).class = {'Test'}; % sens | |
% VIS.PClass = 1; % Predict the third class | |
% % 4/22/20 Straight SciRep sequence | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [10 2 3 12 15 4 5 21 8 17 7]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [1 14 19 18 22 9 23 11 16 20]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [13 6]; patind(4).class = {'Test'}; patind(4).tcoc = [-1 1]; % -1 = Resist 1 = Sens | |
% %patind(4).num = testvec; patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% % 4/22/20 Poly | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [10 12 13]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [14 19 18 22 9 23 11 16 20]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [2 3 15 4 5 21 8 17 7 1 6]; patind(4).tcoc = zeros(1,11); patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% % 8/22/20 SciRep sequence | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [10 2 3 12 15 4 5 21 8 17 7]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [1 14 19 18 22 9 23 11 16 20]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [13 6]; patind(4).tcoc = [-1 1]; % -1 = Resist 1 = Sens | |
% %patind(4).num = testvec; patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% % AA 8/23/20 Train on Poly sorted by class | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [10 12 13]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [9 11 14 16 18 19 20 22 23]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [2 3 4 5 7 8 15 17 21 1 6]; patind(4).tcoc = zeros(1,11); patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% % BB 8/23/20 Train on Ag-Met-Pol sorted by class | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [2 3 10 12 4 5 7 8 15 17 21]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [1 9 11 14 16 18 19 20 22 23]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [13 6]; patind(4).class = {'Test'}; patind(4).tcoc = [-1 1]; % -1 = Resist 1 = Sens | |
% %patind(4).num = testvec; patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% % CC Ag-Pol matched to sortFV on AA | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [3 2 10 12 7 17 15 4 5 21 8]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [11 23 9 16 20 1 14 19 18 22]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [13 6]; patind(4).tcoc = zeros(1,2); patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
% DD 8/23/20 Train on Agar-poly test mets matched to sortFV | |
patind(1).descrip = {'Test Set'}; | |
patind(2).num = [2 3 10 12]; patind(2).class = {'Class1'}; % resist | |
patind(3).num = [1 9 11 14 16 18 19 20 22 23]; patind(3).class = {'Class2'}; % sens | |
patind(4).num = [4 5 7 8 15 17 21 13 6]; patind(4).class = {'Test'}; patind(4).tcoc = [0 0 0 0 0 0 0 -1 1]; % -1 = Resist 1 = Sens | |
%patind(4).num = testvec; patind(4).class = {'Test'}; | |
VIS.PClass = 1; % Predict the third class | |
% % 8/27/20 | |
% patind(1).descrip = {'Test Set'}; | |
% patind(2).num = [3 13 2 10 12 7 17 15 4 5 21 8]; patind(2).class = {'Class1'}; % resist | |
% patind(3).num = [6 11 23 9 16 20 1 14 19 18 22]; patind(3).class = {'Class2'}; % sens | |
% patind(4).num = [13 6]; patind(4).tcoc = zeros(1,2); patind(4).class = {'Test'}; | |
% VIS.PClass = 1; % Predict the third class | |
NpatRclass = length(patind(2).num); | |
NpatSclass = length(patind(3).num); | |
Ntest = 0; | |
Ntype = 3; | |
if VIS.PClass == 1 | |
Ntest = length(patind(4).num); | |
Ntype = 4; | |
end | |
ind = 0; | |
for ploop = 1:NpatRclass | |
ind = ind + 1; | |
pctmp(ind) = -1; | |
end | |
for ploop = 1:NpatSclass | |
ind = ind + 1; | |
pctmp(ind) = +1; | |
end | |
PatClass = pctmp'; % Column vector with two-class labels | |
patind(1).num = concat(patind(2).num,patind(3).num); | |
patind(1).Npatc = length(patind(1).num); | |
patind(2).Npatc = length(patind(2).num); | |
patind(3).Npatc = length(patind(3).num); | |
Npat = length(patind(2).num) + length(patind(3).num); % Npat is only for 2-class ViewIntraSet uses | |
if VIS.PClass == 1 | |
patind(4).Npatc = length(patind(4).num); | |
patind(5).num = concat(patind(1).num,patind(4).num); | |
patind(5).Npatc = length(patind(5).num); | |
Npatot = Npat + Ntest; | |
end | |
% patindtmp = []; | |
% for loop = 2:3 | |
% patindtmp = concat(patindtmp,patind(loop).num); | |
% patind(loop).Npatc = length(patind(loop).num); | |
% end | |
% patind(1).num = patindtmp; | |
% patind(1).Npatc = length(patind(1).num); | |
for ploop = 1:Npat | |
patnm(ploop) = pat(patind(1).num(ploop)); | |
end | |
if VIS.PClass == 1 | |
VIS.Ntest = Ntest; | |
for ploop = 1:Ntest | |
patestnm(ploop) = pat(patind(4).num(ploop)); | |
end | |
for ploop = 1:Npatot | |
patotnm(ploop) = pat(patind(5).num(ploop)); | |
end | |
end | |
ind = 0; patex = 0; | |
np = length(testvec); | |
for loop = 1:np | |
if where(patind(1).num,testvec(loop)) == -1 | |
ind = ind + 1; | |
patex(ind) = testvec(loop); | |
end | |
end | |
patex | |
% Missing data sets | |
pdmiss = zeros(NpatTrial,Ndrug); | |
load dbiHOV | |
Nsamp = length(dbi); | |
% Place classtype into dbi.growth | |
dbind = 0; | |
for sloop = 1:Nsamp | |
patname = dbi(sloop).cell; | |
flag = 0; ind = 0; patnum = 0; | |
while (flag == 0)&&(ind < NpatTrial) | |
ind = ind + 1; | |
if strcmp(char(pat(ind)),patname) | |
flag = 1; | |
patnum = ind; | |
end | |
end | |
if patnum > 0 | |
dbind = dbind+1; | |
dbinew(dbind) = dbi(sloop); | |
for tloop = 2:3 % changed from Ntype 2/12/20 | |
w = where(patind(tloop).num,patnum); | |
if w ~=-1 | |
dbinew(dbind).growth = char(patind(tloop).class); | |
end | |
end | |
end | |
end | |
%keyboard | |
clearvars -GLOBAL dbi | |
global dbi | |
dbi = dbinew; | |