Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: growth predictions under anaerobic conditions #377

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/modelTests/growth.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
x=0:0.001:lim;
y = x;
plot(x,y,'--','MarkerSize',6,'Color',[64,64,64]/256)
xlabel('Experimental growth rate [1/h]','FontSize',14,'FontName','Helvetica')
ylabel('In silico growth rate [1/h]','FontSize',14,'FontName','Helvetica')
xlabel('In silico growth rate [1/h]','FontSize',14,'FontName','Helvetica')
ylabel('Experimental growth rate [1/h]','FontSize',14,'FontName','Helvetica')
legend(b,'N-limited aerobic','C-limited aerobic','C-limited anaerobic','N-limited anaerobic','Location','northwest')

% meanerror = sqrt(sum(([exp_data1(:,4);exp_data2(:,4);exp_data3(:,4);exp_data4(:,4)]-[mod_data1(:,4);mod_data2(:,4);mod_data3(:,4);mod_data4(:,4)]).^2)/32)/sqrt(32);
Expand Down
2 changes: 0 additions & 2 deletions code/otherChanges/anaerobicModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@

%1st change: Refit GAM and NGAM to exp. data, change biomass composition
GAM = 30.49; %Data from Nissen et al. 1997
P = 0.461; %Data from Nissen et al. 1997
NGAM = 0; %Refit done in Jouthen et al. 2012

model = changeGAM(model,GAM,NGAM);
model = scaleBioMass(model,'protein',P,'carbohydrate',false);

%2nd change: Removes the requirement of heme a, NAD(PH), coenzyme A in the biomass equation
% (not used under anaerobic conditions)
Expand Down
39 changes: 22 additions & 17 deletions code/otherChanges/scaleBioMass.m
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
function model = scaleBioMass(model,component,new_value,balance_out,dispOutput)
% scaleBioMass
% Scales the biomass composition
%
% model (struct) metabolic model in COBRA format
% component (str) name of the component to rescale (e.g. "protein")
% new_value (float) new total fraction for said component
% balance_out (str, opt) if chosen, the name of another component with which
% the model will be balanced out so that the total mass remains = 1 g/gDW
% provide empty string '' if this should not be done
% dispOutput (bool, opt) if output from sumBioMass should be displayed (default = true)
%
% model (struct) modified model
%
% Usage: model = scaleBioMass(model,component,new_value,balance_out,dispOutput)
%
% scaleBioMass
% Scales the biomass composition
%
% Input:
% model (struct) yeast-GEM model
% component (string) biomass component to change (options are:
% 'carbohydrate', 'protein', 'lipid', 'RNA', 'DNA',
% 'ion', 'cofactor')
% new_value (num) new total fraction for the specified biomass
% component
% balance_out (string, optional) biomass component that will be used
% to balance out the biomass composition, so that the
% total mass adds up to 1 g/gDCW. This is highly
% recommended (default = empty, no scaling takes place)
% dispOutput (bool, optional) displayed outoupt (default = true)
%
% Output:
% model (struct) modified yeast-GEM model
%
% Usage: model = scaleBioMass(model,component,new_value,balance_out,dispOutput)

if nargin < 5
dispOutput = true;
Expand All @@ -30,13 +35,13 @@
old_value = eval(content_Cap{pos});
f = new_value / old_value;
model = rescalePseudoReaction(model,component,f);
X = sumBioMass(model,false);

%Balance out (if desired):
if ~isempty(balance_out)
pos = strcmp(content_all,balance_out);
balance_value = eval(content_Cap{pos});
f = (balance_value - (new_value - old_value)) / balance_value;
f = (balance_value + (1-X)) / balance_value;
model = rescalePseudoReaction(model,balance_out,f);
end

end
2 changes: 1 addition & 1 deletion data/testResults/growth.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## R2 of growth rate prediction
0.8798
0.8369

![Growth curve](growth.png)
Binary file modified data/testResults/growth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading