-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimulationIronReducedCostSuppl.m
134 lines (103 loc) · 3.72 KB
/
simulationIronReducedCostSuppl.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
%% simulationIronReducedCostSuppl
% Add palmitoleate, oleate and ergosterol to see how growth changes
% Timing: ~ 15000 s
tic;
load('CofactorYeast.mat');
load('enzymedata.mat');
soplexpath = '/Users/cheyu/build/bin/soplex'; % change this to the soplex path on your PC
%% Set model
% set medium
model = setMedia(model,1);% minimal media (Delft media)
% set carbon source
model = changeRxnBounds(model,'r_1714',-1000,'l');% glucose
% set oxygen
model = changeRxnBounds(model,'r_1992',-1000,'l');
% block reactions
model = blockRxns(model);
%% Set optimization
rxnID = 'dilute_dummy';
osenseStr = 'Maximize';
tot_protein = 0.46; %g/gCDW, estimated from the original GEM.
f_modeled_protein = extractModeledprotein(model,'r_4041','s_3717[c]'); %g/gProtein
% r_4041 is pseudo_biomass_rxn_id in the GEM
% s_3717[c] is protein id
f = tot_protein * f_modeled_protein;
f_mito = 0.1;
clear tot_protein f_modeled_protein;
%% Solve LPs
% reference
[~,flux_ref100] = searchMaxgrowth(model,f,f_mito,osenseStr,rxnID,enzymedata,0,1e-6,soplexpath);
q_fe_ref100 = flux_ref100(strcmp(model.rxns,'r_1861'),1);
%% Solve LPs
factor_k_withoutcofator = 0.5;
lower_fe = 0.5;
q_fe_new = q_fe_ref100*lower_fe;
model_fe50 = changeRxnBounds(model,'r_1861',q_fe_new,'b');
[~,flux_ref50] = searchMaxgrowth(model_fe50,f,f_mito,osenseStr,rxnID,enzymedata,factor_k_withoutcofator,1e-6,soplexpath);
met_Exchanges = {'r_1994' ... % palmitoleate exchange
'r_2189' ... % oleate exchange
'r_1757'}; % ergosterol exchange
met_IDs = {'Palmitoleate' 'Oleate' 'Ergosterol'};
q_delta = -0.001;
fluxes = zeros(length(model.rxns),length(met_Exchanges));
for i = 1:length(met_Exchanges)
model_tmp = model_fe50;
model_tmp = changeRxnBounds(model_tmp,met_Exchanges{i},q_delta,'l');
disp(['Adding ' met_IDs{i}]);
[~,flux_tmp] = searchMaxgrowth(model_tmp,f,f_mito,osenseStr,rxnID,enzymedata,factor_k_withoutcofator,1e-6,soplexpath);
fluxes(:,i) = flux_tmp;
end
sIRCS_res.lables = ['Ref' met_IDs];
sIRCS_res.fluxes = [flux_ref50 fluxes];
cd Results/;
save('sIRCS_res.mat','sIRCS_res');
cd ../;
clear;
%% simulationRefReducedCostAA
% Add each amino acid to see how growth changes
load('CofactorYeast.mat');
load('enzymedata.mat');
%% Set model
% set medium
model = setMedia(model,1);% minimal media (Delft media)
% set carbon source
model = changeRxnBounds(model,'r_1714',-1000,'l');% glucose
% set oxygen
model = changeRxnBounds(model,'r_1992',-1000,'l');
% block reactions
model = blockRxns(model);
%% Set optimization
rxnID = 'dilute_dummy';
osenseStr = 'Maximize';
tot_protein = 0.46; %g/gCDW, estimated from the original GEM.
f_modeled_protein = extractModeledprotein(model,'r_4041','s_3717[c]'); %g/gProtein
% r_4041 is pseudo_biomass_rxn_id in the GEM
% s_3717[c] is protein id
f = tot_protein * f_modeled_protein;
f_mito = 0.1;
clear tot_protein f_modeled_protein;
%% Solve LPs
% reference
[~,flux_ref] = searchMaxgrowth(model,f,f_mito,osenseStr,rxnID,enzymedata,0,1e-6,soplexpath);
%% Solve LPs
factor_k_withoutcofator = 0;
met_Exchanges = {'r_1994' ... % palmitoleate exchange
'r_2189' ... % oleate exchange
'r_1757'}; % ergosterol exchange
met_IDs = {'Palmitoleate' 'Oleate' 'Ergosterol'};
q_delta = -0.001;
fluxes = zeros(length(model.rxns),length(met_Exchanges));
for i = 1:length(met_Exchanges)
model_tmp = model;
model_tmp = changeRxnBounds(model_tmp,met_Exchanges{i},q_delta,'l');
disp(['Adding ' met_IDs{i}]);
[~,flux_tmp] = searchMaxgrowth(model_tmp,f,f_mito,osenseStr,rxnID,enzymedata,factor_k_withoutcofator,1e-6,soplexpath);
fluxes(:,i) = flux_tmp;
end
sRRCS_res.lables = ['Ref' met_IDs];
sRRCS_res.fluxes = [flux_ref fluxes];
cd Results/;
save('sRRCS_res.mat','sRRCS_res');
cd ../;
clear;
toc;