diff --git a/code/modelTests/growth.m b/code/modelTests/growth.m index 7bc75afd..6e211899 100644 --- a/code/modelTests/growth.m +++ b/code/modelTests/growth.m @@ -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); diff --git a/code/otherChanges/anaerobicModel.m b/code/otherChanges/anaerobicModel.m index 3ee6d8b4..a86c29f3 100644 --- a/code/otherChanges/anaerobicModel.m +++ b/code/otherChanges/anaerobicModel.m @@ -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) diff --git a/code/otherChanges/scaleBioMass.m b/code/otherChanges/scaleBioMass.m index 07cbda2b..dab4282a 100644 --- a/code/otherChanges/scaleBioMass.m +++ b/code/otherChanges/scaleBioMass.m @@ -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; @@ -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 diff --git a/data/testResults/growth.md b/data/testResults/growth.md index 8212950e..5155ef01 100644 --- a/data/testResults/growth.md +++ b/data/testResults/growth.md @@ -1,4 +1,4 @@ ## R2 of growth rate prediction -0.8798 +0.8369 ![Growth curve](growth.png) diff --git a/data/testResults/growth.png b/data/testResults/growth.png index 528b20df..90e43a0e 100644 Binary files a/data/testResults/growth.png and b/data/testResults/growth.png differ