Commit 9a106090 authored by Michaela Olson's avatar Michaela Olson
Browse files

clarifications to comments in code

parent a7edcb47
...@@ -52,10 +52,6 @@ end ...@@ -52,10 +52,6 @@ end
% save the workspace used % save the workspace used
overall_vars.WORKSPACE = chosen_workspaces; overall_vars.WORKSPACE = chosen_workspaces;
% save whether efflux was in lipid or not
overall_vars.EFFLUX_IN_LIPID = efflux_in_lipid;
disp(strcat("distance metric is ", d_metric)) disp(strcat("distance metric is ", d_metric))
if large_group if large_group
......
...@@ -521,7 +521,6 @@ backwards_select_analysis ...@@ -521,7 +521,6 @@ backwards_select_analysis
% from the overall vars --> just straight up look for highest percent % from the overall vars --> just straight up look for highest percent
% and if there is more than one, take lowest value % and if there is more than one, take lowest value
% did I steal this from another section of code? what are you, a cop
% get all of the fieldnames for overall vars % get all of the fieldnames for overall vars
field_names = fieldnames(overall_vars); field_names = fieldnames(overall_vars);
......
...@@ -231,7 +231,7 @@ moa_table = sortrows(moa_table,'DRUG'); ...@@ -231,7 +231,7 @@ moa_table = sortrows(moa_table,'DRUG');
%connectivity_plot(moa_table,color_struct,all_categories,chosen_colormap,wbg) %connectivity_plot(moa_table,color_struct,all_categories,chosen_colormap,wbg)
%sgtitle({bayes_file,run_tot_string},'Interpreter','none') %sgtitle({bayes_file,run_tot_string},'Interpreter','none')
%% want to go through and make it into funky two way table time %% want to go through and make it into a two way table
% add a moa column % add a moa column
results_table.MOA = results_table.DRUG; results_table.MOA = results_table.DRUG;
...@@ -268,11 +268,6 @@ two_way_table= make_two_way_table(results_table,'DRUG','NEIGHBOR'); ...@@ -268,11 +268,6 @@ two_way_table= make_two_way_table(results_table,'DRUG','NEIGHBOR');
%title("drugs on bottom have the neighbors of drugs on left") %title("drugs on bottom have the neighbors of drugs on left")
%% want to create a table that adds together all of the connections %% want to create a table that adds together all of the connections
% would it be easier to start with the bayes struct or 1 way table?
% we'd need to add together first again before taking the percents... hm
% could actually just get raw values back by multiplying and dividng by 100
raw_two_way_table = two_way_table; raw_two_way_table = two_way_table;
raw_two_way_table{:,:} = raw_two_way_table{:,:}/100*total_runs; raw_two_way_table{:,:} = raw_two_way_table{:,:}/100*total_runs;
......
function drug_moas = change_to_moa(drugList,all_categories) function drug_moas = change_to_moa(drugList,all_categories)
% INPUT list of drugs % INPUT list of drugs
% will read them in and change them to their MoA % will read them in and change them to their MoA
% is this like assign MoA? probably
% let me live my life
% all_categories is a struct where ,for example, all_categories.protein has % all_categories is a struct where ,for example, all_categories.protein has
% an array of all of the different protein drugs % an array of all of the different protein drugs
......
...@@ -5,7 +5,7 @@ function final_data_table = combine_workspaces(chosen_workspaces,workspace_direc ...@@ -5,7 +5,7 @@ function final_data_table = combine_workspaces(chosen_workspaces,workspace_direc
% create a structure to store the final_data_table s from each workspace % create a structure to store the final_data_table s from each workspace
all_spaces = struct; all_spaces = struct;
for i = chosen_workspaces for i = chosen_workspaces
% get each individual spacee % get each individual space
one_space = i{1}; one_space = i{1};
% need to get final data table from each space and concat final_data_table % need to get final data table from each space and concat final_data_table
fpath = strcat(workspace_directory, '/', one_space); fpath = strcat(workspace_directory, '/', one_space);
......
function graph_color_moa(fig) function graph_color_moa(fig)
%less loopy than before, this bad boy ensures everything is exactly the % like graph_color_s but color by MoA
% same every time
% jk ended up being p loopy
% color_maker and graph_helper2 needed to run this
%now to the scatter plot colors %now to the scatter plot colors
ca = get(fig,'CurrentAxes'); ca = get(fig,'CurrentAxes');
...@@ -32,22 +29,19 @@ function graph_color_moa(fig) ...@@ -32,22 +29,19 @@ function graph_color_moa(fig)
% sort drug by MoA % sort drug by MoA
RNAP = ["RifT","RIF","RNAP"]; RNAP = ["RifT","RIF","RNAP"];
lipid = ["PZA","CCCP","Gra","Mon","Nig","Nis","Sulf","BDQ","Clz","Cerold"]; efflux = ["efflux","Ver","Thi"];
lipid_2 = ["Tri","Ver","Thi"]; lipid = ["PZA","CCCP","Gra","Mon","Nig","Nis","BDQ","Clz"];
protein = ["Kan","Amk","Cam","AZT","Cla","Dox","Gent","Strep","Tet","Tig","Lin","protein"]; protein = ["Kan","Amk","Cam","AZT","Cla","Dox","Gent","Strep","Tet","Tig","Lin","protein"];
dna = ["Dau","Nal","Lev","Mox","MIT","Olf","dna","MOX","Olfold","Nit"]; dna = ["Lev","Mox","MIT","Olf","dna","MOX"];
cell_wall = ["Mer","Amp","Amox","Ctax","Clex","INH","ETA","IMI","Pip","Cfox", ... cell_wall = ["Mer","Amp","Ctax","INH","ETA","IMI", ...
"Mec","Oxa","PenG","Van","Pre","Cyc","A22","Carb","Del","EMB","cell_wall","Cer","THL"]; "Van","Pre","Cyc","Del","EMB","cell_wall","Cer","THL"];
controls = ["MeOH","EtOH","NaOH","water","DMSO","Untreated","control"]; controls = ["MeOH","EtOH","NaOH","water","DMSO","Untreated","control"];
unknowns = ["Unknown2019", "Unknown2239", "Unknown2911","Unknown3285","Unknown4050"]; unknowns = ["Unknown2019", "Unknown2239","Unknown3285"];
extras = ["INH_control","INH_control_3x"]; extras = ["INH_control","INH_control_3x"];
stonybrooks = ["high_692","high_701","high_702","low_691","low_692","low_701","low_702"];
%Set up arrays of similar colors for different MoA %Set up arrays of similar colors for different MoA
RNAPcol = color_maker(RNAP, [255 255 0], [0 0 50]); RNAPcol = color_maker(RNAP, [255 255 0], [0 0 50]);
lipidcol = color_maker(lipid,[0 83 166],[8 13 35]); lipidcol = color_maker(lipid,[0 83 166],[8 13 35]);
lipid_2col = color_maker(lipid_2,[0, 211, 211],[100 10 5]);
proteincol = color_maker(protein,[55 92 0],[10 20 4]); proteincol = color_maker(protein,[55 92 0],[10 20 4]);
dnacol = color_maker(dna,[255 234 196],[0,-38,-62]); dnacol = color_maker(dna,[255 234 196],[0,-38,-62]);
cell_wallcol = color_maker(cell_wall,[52 0 109],[9 8 14]); cell_wallcol = color_maker(cell_wall,[52 0 109],[9 8 14]);
......
function graph_color_s(fig) function graph_color_s(fig)
%less loopy than before, this bad boy ensures everything is exactly the % used to color graph using the same color scheme each time
% same every time % apply to existing figure handle
% jk ended up being p loopy
% color_maker and graph_helper2 needed to run this
%now to the scatter plot colors %now to the scatter plot colors
ca = get(fig,'CurrentAxes'); ca = get(fig,'CurrentAxes');
...@@ -33,30 +31,25 @@ function graph_color_s(fig) ...@@ -33,30 +31,25 @@ function graph_color_s(fig)
% sort drug by MoA % sort drug by MoA
RNAP = ["RifT","RIF","RNAP"]; RNAP = ["RifT","RIF","RNAP"];
efflux = ["efflux","Ver","Thi"]; efflux = ["efflux","Ver","Thi"];
lipid = ["PZA","CCCP","Gra","Mon","Nig","Nis","Sulf","BDQ","Clz","Cerold"]; lipid = ["PZA","CCCP","Gra","Mon","Nig","Nis","BDQ","Clz"];
lipid_2 = ["Tri"];
protein = ["Kan","Amk","Cam","AZT","Cla","Dox","Gent","Strep","Tet","Tig","Lin","protein"]; protein = ["Kan","Amk","Cam","AZT","Cla","Dox","Gent","Strep","Tet","Tig","Lin","protein"];
dna = ["Dau","Nal","Lev","Mox","MIT","Olf","dna","MOX","Olfold","Nit"]; dna = ["Lev","Mox","MIT","Olf","dna","MOX"];
cell_wall = ["Mer","Amp","Amox","Ctax","Clex","INH","ETA","IMI","Pip","Cfox", ... cell_wall = ["Mer","Amp","Ctax","INH","ETA","IMI", ...
"Mec","Oxa","PenG","Van","Pre","Cyc","A22","Carb","Del","EMB","cell_wall","Cer","THL"]; "Van","Pre","Cyc","Del","EMB","cell_wall","Cer","THL"];
controls = ["MeOH","EtOH","NaOH","water","DMSO","Untreated","control"]; controls = ["MeOH","EtOH","NaOH","water","DMSO","Untreated","control"];
unknowns = ["Unknown2019", "Unknown2239", "Unknown2911","Unknown3285","Unknown4050"]; unknowns = ["Unknown2019", "Unknown2239","Unknown3285"];
extras = ["INH_control","INH_control_3x"]; extras = ["INH_control","INH_control_3x"];
stonybrooks = ["high_692","high_701","high_702","low_691","low_692","low_701","low_702"];
%Set up arrays of similar colors for different MoA %Set up arrays of similar colors for different MoA
RNAPcol = color_maker(RNAP, [255 255 0], [0 0 50]); RNAPcol = color_maker(RNAP, [255 255 0], [0 0 50]);
effluxcol = color_maker(efflux,[100 19 38],[0 50 50]); effluxcol = color_maker(efflux,[100 19 38],[0 50 50]);
lipidcol = color_maker(lipid,[0 83 166],[8 13 35]); lipidcol = color_maker(lipid,[0 83 166],[8 13 35]);
lipid_2col = color_maker(lipid_2,[0, 211, 211],[100 10 5]);
proteincol = color_maker(protein,[55 92 0],[10 20 4]); proteincol = color_maker(protein,[55 92 0],[10 20 4]);
dnacol = color_maker(dna,[255 234 196],[0,-38,-62]); dnacol = color_maker(dna,[255 234 196],[0,-38,-62]);
cell_wallcol = color_maker(cell_wall,[52 0 109],[9 8 14]); cell_wallcol = color_maker(cell_wall,[52 0 109],[9 8 14]);
controlscol = color_maker(controls,[33 33 33],[25 25 25]); controlscol = color_maker(controls,[33 33 33],[25 25 25]);
unknownscol = color_maker(unknowns,[150 20 170],[20 40 -20]); unknownscol = color_maker(unknowns,[150 20 170],[20 40 -20]);
extrascol = color_maker(extras,[255 255 255],[0 -15 -50]); extrascol = color_maker(extras,[255 255 255],[0 -15 -50]);
stonybrookscol = color_maker(stonybrooks,[240 120 21], [-28 20 32]);
%failsafe if a drug shows up that is not listed %failsafe if a drug shows up that is not listed
nogroup = 0; nogroup = 0;
...@@ -110,10 +103,6 @@ function graph_color_s(fig) ...@@ -110,10 +103,6 @@ function graph_color_s(fig)
ind = find(strcmpi(lipid,name)); ind = find(strcmpi(lipid,name));
graph_helper(scat(row,1), lipidcol,ind,markers) graph_helper(scat(row,1), lipidcol,ind,markers)
elseif ismember(name, lipid_2)
ind = find(strcmp(lipid_2,name));
graph_helper(scat(row,1), lipid_2col,ind,markers)
elseif ismember(name, protein) elseif ismember(name, protein)
ind = find(strcmpi(protein,name)); ind = find(strcmpi(protein,name));
graph_helper(scat(row,1), proteincol,ind,markers) graph_helper(scat(row,1), proteincol,ind,markers)
...@@ -126,10 +115,6 @@ function graph_color_s(fig) ...@@ -126,10 +115,6 @@ function graph_color_s(fig)
ind = find(strcmpi(cell_wall,name)); ind = find(strcmpi(cell_wall,name));
graph_helper(scat(row,1), cell_wallcol,ind,markers) graph_helper(scat(row,1), cell_wallcol,ind,markers)
elseif ismember(name,stonybrooks)
ind = find(strcmpi(stonybrooks,name));
graph_helper(scat(row,1), stonybrookscol,ind,markers)
elseif ismember(name, controls) elseif ismember(name, controls)
ind = find(strcmpi(controls,name)); ind = find(strcmpi(controls,name));
graph_helper(scat(row,1), controlscol,ind,markers) graph_helper(scat(row,1), controlscol,ind,markers)
......
function full_names = replace_allcap_name(abbv_names) function full_names = replace_allcap_name(abbv_names)
% converts all drug abbreviations to all cap versions % converts all drug abbreviations to all cap versions
% % will also change _025x to " low" and _3x to " high"
%
% abbv_names = strrep(abbv_names, 'Amp','AMP');
% abbv_names = strrep(abbv_names, 'Ctax','CTAX');
% abbv_names = strrep(abbv_names, 'Mer','MER');
% % abbv_names = strrep(abbv_names, 'INH','isoniazid');
% % abbv_names = strrep(abbv_names, 'EMB','ethambutol');
% % abbv_names = strrep(abbv_names, 'ETA','ethionamide');
% % abbv_names = strrep(abbv_names, 'IMI','imipenem');
% abbv_names = strrep(abbv_names, 'Pip','PIP');
% abbv_names = strrep(abbv_names, 'Oxa','OXA');
% abbv_names = strrep(abbv_names, 'PenG','PENG');
% abbv_names = strrep(abbv_names, 'Van','VAN');
% abbv_names = strrep(abbv_names, 'Cyc','CYC');
% abbv_names = strrep(abbv_names, 'Carb','CARB');
% abbv_names = strrep(abbv_names, 'Del','DEL');
% abbv_names = strrep(abbv_names, 'Dau','DAU');
% abbv_names = strrep(abbv_names, 'Nal','NAL');
% abbv_names = strrep(abbv_names, 'Lev','LEV');
% abbv_names = strrep(abbv_names, 'Mox','MOX');
% abbv_names = strrep(abbv_names, 'Clz','CLZ');
% % abbv_names = strrep(abbv_names, 'MIT','MIT');
% abbv_names = strrep(abbv_names, 'Olf','OLF');
% abbv_names = strrep(abbv_names, 'Kan','KAN');
% abbv_names = strrep(abbv_names, 'Amk','AMK');
% abbv_names = strrep(abbv_names, 'Cam','CAM');
% % abbv_names = strrep(abbv_names, 'AZT','azithromycin');
% abbv_names = strrep(abbv_names, 'Cla','CLA');
% abbv_names = strrep(abbv_names, 'Dox','DOX');
% abbv_names = strrep(abbv_names, 'Gent','GENT');
% abbv_names = strrep(abbv_names, 'Strep','STREP');
% abbv_names = strrep(abbv_names, 'Tet','TET');
% abbv_names = strrep(abbv_names, 'Tig','TIG');
% abbv_names = strrep(abbv_names, 'Lin','LIN');
% abbv_names = strrep(abbv_names, 'Pre','PRE');
% % abbv_names = strrep(abbv_names, 'CCCP','carbonyl cyanide 3-chlorophenylhydrazone');
% abbv_names = strrep(abbv_names, 'Cer','CER');
% abbv_names = strrep(abbv_names, 'Gra','GRA');
% abbv_names = strrep(abbv_names, 'Mon','MON');
% abbv_names = strrep(abbv_names, 'Nig','NIG');
% abbv_names = strrep(abbv_names, 'Nis','NIS');
% abbv_names = strrep(abbv_names, 'Tri','TRI');
% abbv_names = strrep(abbv_names, 'Ver','VER');
% abbv_names = strrep(abbv_names, 'Thi','THI');
% abbv_names = strrep(abbv_names, 'RifT','RIFT');
% abbv_names = strrep(abbv_names, 'Nit','NIT');
% abbv_names = strrep(abbv_names, 'Sulf','SULF');
% abbv_names = strrep(abbv_names, 'BDQ','bedaquiline');
% abbv_names = strrep(abbv_names, 'RIF','rifampicin');
% abbv_names = strrep(abbv_names, 'PZA','pyrazinamide');
abbv_names = upper(abbv_names); abbv_names = upper(abbv_names);
abbv_names = strrep(abbv_names,'_025x',' L'); abbv_names = strrep(abbv_names,'_025x',' L');
......
...@@ -8,15 +8,10 @@ function full_names = replace_full_name(abbv_names) ...@@ -8,15 +8,10 @@ function full_names = replace_full_name(abbv_names)
abbv_names = strrep(abbv_names, 'EMB','ethambutol'); abbv_names = strrep(abbv_names, 'EMB','ethambutol');
abbv_names = strrep(abbv_names, 'ETA','ethionamide'); abbv_names = strrep(abbv_names, 'ETA','ethionamide');
abbv_names = strrep(abbv_names, 'IMI','imipenem'); abbv_names = strrep(abbv_names, 'IMI','imipenem');
abbv_names = strrep(abbv_names, 'Pip','piperacillin');
abbv_names = strrep(abbv_names, 'Oxa','oxacillin');
abbv_names = strrep(abbv_names, 'PenG','penicillin G');
abbv_names = strrep(abbv_names, 'Van','vancomycin'); abbv_names = strrep(abbv_names, 'Van','vancomycin');
abbv_names = strrep(abbv_names, 'Cyc','cycloserine'); abbv_names = strrep(abbv_names, 'Cyc','cycloserine');
abbv_names = strrep(abbv_names, 'Carb','carbenicillin'); abbv_names = strrep(abbv_names, 'Carb','carbenicillin');
abbv_names = strrep(abbv_names, 'Del','delamanid'); abbv_names = strrep(abbv_names, 'Del','delamanid');
abbv_names = strrep(abbv_names, 'Dau','daunorubicin');
abbv_names = strrep(abbv_names, 'Nal','nalidixic acid');
abbv_names = strrep(abbv_names, 'Lev','levofloxacin'); abbv_names = strrep(abbv_names, 'Lev','levofloxacin');
abbv_names = strrep(abbv_names, 'Mox','moxifloxacin'); abbv_names = strrep(abbv_names, 'Mox','moxifloxacin');
abbv_names = strrep(abbv_names, 'Clz','clofazimine'); abbv_names = strrep(abbv_names, 'Clz','clofazimine');
...@@ -25,7 +20,6 @@ function full_names = replace_full_name(abbv_names) ...@@ -25,7 +20,6 @@ function full_names = replace_full_name(abbv_names)
abbv_names = strrep(abbv_names, 'Kan','kanamycin'); abbv_names = strrep(abbv_names, 'Kan','kanamycin');
abbv_names = strrep(abbv_names, 'Amk','amikacin'); abbv_names = strrep(abbv_names, 'Amk','amikacin');
abbv_names = strrep(abbv_names, 'Cam','chloramphenicol'); abbv_names = strrep(abbv_names, 'Cam','chloramphenicol');
abbv_names = strrep(abbv_names, 'AZT','azithromycin');
abbv_names = strrep(abbv_names, 'Cla','clarithromycin'); abbv_names = strrep(abbv_names, 'Cla','clarithromycin');
abbv_names = strrep(abbv_names, 'Dox','doxycycline'); abbv_names = strrep(abbv_names, 'Dox','doxycycline');
abbv_names = strrep(abbv_names, 'Gent','gentamicin'); abbv_names = strrep(abbv_names, 'Gent','gentamicin');
...@@ -34,17 +28,13 @@ function full_names = replace_full_name(abbv_names) ...@@ -34,17 +28,13 @@ function full_names = replace_full_name(abbv_names)
abbv_names = strrep(abbv_names, 'Tig','tigecycline'); abbv_names = strrep(abbv_names, 'Tig','tigecycline');
abbv_names = strrep(abbv_names, 'Lin','linezolid'); abbv_names = strrep(abbv_names, 'Lin','linezolid');
abbv_names = strrep(abbv_names, 'Pre','pretomanid'); abbv_names = strrep(abbv_names, 'Pre','pretomanid');
% abbv_names = strrep(abbv_names, 'CCCP','carbonyl cyanide 3-chlorophenylhydrazone');
abbv_names = strrep(abbv_names, 'Cer','cerulenin'); abbv_names = strrep(abbv_names, 'Cer','cerulenin');
abbv_names = strrep(abbv_names, 'Gra','gramicidin'); abbv_names = strrep(abbv_names, 'Gra','gramicidin');
abbv_names = strrep(abbv_names, 'Mon','monensin'); abbv_names = strrep(abbv_names, 'Mon','monensin');
abbv_names = strrep(abbv_names, 'Nig','nigericin'); abbv_names = strrep(abbv_names, 'Nig','nigericin');
abbv_names = strrep(abbv_names, 'Nis','nisin'); abbv_names = strrep(abbv_names, 'Nis','nisin');
abbv_names = strrep(abbv_names, 'Tri','triclosan');
abbv_names = strrep(abbv_names, 'Ver','verapamil');
abbv_names = strrep(abbv_names, 'Thi','thioridazine'); abbv_names = strrep(abbv_names, 'Thi','thioridazine');
abbv_names = strrep(abbv_names, 'RifT','rifapentine'); abbv_names = strrep(abbv_names, 'RifT','rifapentine');
abbv_names = strrep(abbv_names, 'Nit','nitrofurantoin');
abbv_names = strrep(abbv_names, 'Sulf','sulfamethizole'); abbv_names = strrep(abbv_names, 'Sulf','sulfamethizole');
abbv_names = strrep(abbv_names, 'BDQ','bedaquiline'); abbv_names = strrep(abbv_names, 'BDQ','bedaquiline');
abbv_names = strrep(abbv_names, 'RIF','rifampicin'); abbv_names = strrep(abbv_names, 'RIF','rifampicin');
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%%% %%%
%%% OUTPUT: final_data_table, with the chosen drugs removed %%% OUTPUT: final_data_table, with the chosen drugs removed
%%% apply , whether there are drugs to apply %%% apply , whether there are drugs to apply
%%% drug_to_apply, a subsection of the final_data_table only for the drug to apply (correct?) %%% drug_to_apply, a subsection of the final_data_table only for the drug to apply
%%% choice_indexes %%% choice_indexes
%%% chosen chosen_drugs %%% chosen chosen_drugs
%%% %%%
...@@ -68,7 +68,7 @@ chosen = chosen_drugs; ...@@ -68,7 +68,7 @@ chosen = chosen_drugs;
%% %%
% want to make them keep untreated, put in a boolean to get rid of it later % want to make them keep untreated, put in a boolean to get rid of it later
% after TVN maybe? % after TVN
% force user to select untreated % force user to select untreated
if ~any(contains(chosen,'Untreated')) if ~any(contains(chosen,'Untreated'))
chosen = [chosen {'Untreated'}]; chosen = [chosen {'Untreated'}];
......
...@@ -109,41 +109,41 @@ end ...@@ -109,41 +109,41 @@ end
%% for Untreated, we can just put all of the untreated into one rep and call it a day %% for Untreated, we can just put all of the untreated into one rep and call it a day
% this is just a fix for that bayes stuff right now le'ts go % this is just a fix for that bayes stuff right now le'ts go
if bayesian if bayesian
unt_reps = fieldnames(split_tables.drug52_doseResponse.Untreated)'; unt_reps = fieldnames(split_tables.drug34_doseResponse.Untreated)';
% add a new field for all reps % add a new field for all reps
split_tables.drug52_doseResponse.Untreated.all_reps = struct; split_tables.drug34_doseResponse.Untreated.all_reps = struct;
% want to make this flexible later but now just need to get things going % want to make this flexible later but now just need to get things going
for i = unt_reps for i = unt_reps
rep=i{1}; rep=i{1};
unt3x = split_tables.drug52_doseResponse.Untreated.(rep).Untreated_3x; unt3x = split_tables.drug34_doseResponse.Untreated.(rep).Untreated_3x;
unt025x = split_tables.drug52_doseResponse.Untreated.(rep).Untreated_025x; unt025x = split_tables.drug34_doseResponse.Untreated.(rep).Untreated_025x;
if strcmp(rep,"rep1") if strcmp(rep,"rep1")
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_3x = unt3x; split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_3x = unt3x;
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_025x = unt025x; split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_025x = unt025x;
else else
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_3x = ... split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_3x = ...
vertcat(split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_3x, unt3x); vertcat(split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_3x, unt3x);
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_025x = ... split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_025x = ...
vertcat(split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_025x, unt025x); vertcat(split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_025x, unt025x);
end end
split_tables.drug52_doseResponse.Untreated = ... split_tables.drug34_doseResponse.Untreated = ...
rmfield(split_tables.drug52_doseResponse.Untreated,rep); rmfield(split_tables.drug34_doseResponse.Untreated,rep);
end end
% go replace the rep column to all have the same thing so it works on next % go replace the rep column to all have the same thing so it works on next
% step % step
maxlen = length(split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_025x.REP); maxlen = length(split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_025x.REP);
for i = 1:maxlen for i = 1:maxlen
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_025x.REP(i) = ... split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_025x.REP(i) = ...
{'ALL'}; {'ALL'};
split_tables.drug52_doseResponse.Untreated.all_reps.Untreated_3x.REP(i) = ... split_tables.drug34_doseResponse.Untreated.all_reps.Untreated_3x.REP(i) = ...
{'ALL'}; {'ALL'};
......
...@@ -12,65 +12,55 @@ map = interp1(vec,raw,linspace(100,0,N),'pchip'); ...@@ -12,65 +12,55 @@ map = interp1(vec,raw,linspace(100,0,N),'pchip');
%% Different drug categories %% Different drug categories
% put all drug categories in a structure % put all drug categories in a structure
% maybe probably do something about the _025x and _3x nonsence
all_categories = struct; all_categories = struct;
% want to also auto add 025x and 3x to each array % want to also auto add 025x and 3x to each array
% categories that are the same regardless of large or small group % categories that are the same regardless of large or small group
all_categories.rnap = ["RIF","RifT", "OLDRifT","rifapentine","rifampicin","rif6h","rift6h"]; all_categories.rnap = ["RIF","RifT", "OLDRifT","rifapentine","rifampicin","rif6h","rift6h"];
all_categories.dna = ["Dau","Lev","MIT","Mox","Nal","Olf","Sulf","Nit", "Olfold", "OLDMOX",... all_categories.dna = ["Lev","MIT","Mox","Olf","OLDMOX",...
"daunorubicin","nalidixic acid","levofloxacin","moxifloxacin","mitomycin",... "levofloxacin","moxifloxacin","mitomycin",...
"ofloxacin","nitrofurantoin","sulfamethizole","mox6h"]; "ofloxacin","mox6h"];
all_categories.control = ["water","Untreated","NaOH","MeOH","EtOH","DMSO"]; all_categories.control = ["water","Untreated","NaOH","MeOH","EtOH","DMSO"];
all_categories.unknown = ["Unknown2019","Unknown2238","Unknown2239",... all_categories.unknown = ["Unknown2019","Unknown2238","Unknown2239",...
"Unknown2911","Unknown3825","Unknown4050","Unknown3285"]; "Unknown3825","Unknown3285"];
% different categories depending on fine grouping % different categories depending on fine grouping
if large_group if large_group
all_categories.protein = ["AZT","Amk","Cam","Cla","Dox","Gent","Kan","Lin","Strep","Tet","Tig",... all_categories.protein = ["Amk","Cam","Cla","Dox","Gent","Kan","Lin","Strep","Tet","Tig",...
"kanamycin","amikacin","chloramphenicol","azithromycin","clarithromycin",... "kanamycin","amikacin","chloramphenicol","clarithromycin",...
"doxycycline","gentamicin","streptomycin","tetracycline","tigecycline",... "doxycycline","gentamicin","streptomycin","tetracycline","tigecycline",...
"linezolid","lin6h"]; "linezolid","lin6h"];
all_categories.lipid = ["Tri","Nis","Nig","Mon","Gra","CCCP","PZA","Clz","BDQ","OLDBDQ", ... all_categories.lipid = ["Tri","Nis","Nig","Mon","Gra","CCCP","PZA","Clz","BDQ","OLDBDQ", ...
"OLDPZA","OLDClz","clofazimine","carbonyl cyanide 3-chlorophenylhydrazone",... "OLDPZA","OLDClz","clofazimine","carbonyl cyanide 3-chlorophenylhydrazone",...
"gramicidin","monensin","nigericin","nisin","triclosan","bedaquiline",... "gramicidin","monensin","nigericin","nisin","triclosan","bedaquiline",...
"pyrazinamide","bdq6h","pza6h","clz6h" ]; "pyrazinamide","bdq6h","pza6h","clz6h","Ver","Thi","verapamil","thioridazine" ];
% if we want to put the efflux acting drugs into the lipid category...
if efflux_in_lipid
%...append them to the list of lipids
all_categories.lipid = [all_categories.lipid, "Ver","Thi","verapamil","thioridazine"];
% for simplicity, create a blank efflux array so that efflux still
% exists and won't get upset later
all_categories.efflux = [""];
else
% if not, have them be their own separate array
all_categories.efflux = ["Ver","Thi","verapamil","thioridazine"];
end
% for simplicity, create a blank efflux array so that efflux still
% exists and won't get upset later -- outdated
all_categories.efflux = [""];
all_categories.cell_wall = ["A22","Amp","Carb","Ctax","Cyc","Del","EMB","ETA",... all_categories.cell_wall = ["Amp","Ctax","Cyc","Del","EMB","ETA",...
"IMI","INH","Mer","Oxa","Pip","Pre","Van","THL","Cer",... "IMI","INH","Mer","Pre","Van","THL","Cer",...
"PenG","OLDPre","OLDEMB","OLDINH",... "OLDPre","OLDEMB","OLDINH",...
"ampicillin","cefotaxime","meropenem","isoniazid","ethambutol",... "ampicillin","cefotaxime","meropenem","isoniazid","ethambutol",...
"ethionamide","imipenem","piperacillin","oxacillin","penicillin G",... "ethionamide","imipenem",...
"vancomycin","cycloserine","carbenicillin","delamanid","pretomanid",... "vancomycin","cycloserine","delamanid","pretomanid",...
"cerulenin","emb6h","inh6h","pre6h"]; "cerulenin","emb6h","inh6h","pre6h"];
%others = ["PZA", "Ver", "Thi", "Clz","BDQ"]; %others = ["PZA", "Ver", "Thi", "Clz","BDQ"];
else else
% finer settings % finer settings
all_categories.peptidoglycan = ["Mer","Amp","Ctax","IMI","Pip","Oxa","Carb","Van","Cyc","A22",... all_categories.peptidoglycan = ["Mer","Amp","Ctax","IMI","Van","Cyc",...
"meropenem","ampicillin","cefotaxime","imipenem","piperacillin","oxacillin",... "meropenem","ampicillin","cefotaxime","imipenem",...
"carbenicillin","vancomycin"