Skip to content

Commit 38a0ffd

Browse files
committed
feat: include anaerobic curation figures
1 parent 4b06fc8 commit 38a0ffd

13 files changed

Lines changed: 4175 additions & 8246 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This repository contains the current consensus genome-scale metabolic model of _
3939

4040
| Taxonomy | Latest update | Version | Reactions | Metabolites | Genes |
4141
|:-------|:--------------|:------|:------|:----------|:-----|
42-
| _Saccharomyces cerevisiae_ | 26-Feb-2026 | develop | 4102 | 2748 | 1143 |
42+
| _Saccharomyces cerevisiae_ | 26-May-2026 | develop | 4102 | 2748 | 1143 |
4343

4444
# Installation & usage
4545

code/modelTests/anaerobic_flux_predictions.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
colors = orderedcolors("glow12");
1111

12-
figure;
1312
data_sets=unique(text_flux(:,6));
1413
merged_data=[];
1514
merged_sim=[];
@@ -55,8 +54,8 @@
5554
plot(x,y,'--','MarkerSize',6,'Color',[64,64,64]/256)
5655
ylim([0 threshold])
5756
xlim([0 threshold])
58-
text(5,threshold/2,['mean relative error: ' num2str(mean_relative_error)]);
59-
text(5,threshold/2-10,['R^2: ' num2str(R2)]);
57+
text(12,threshold/2-10,['mean relative error: ' num2str(mean_relative_error)]);
58+
text(12,threshold/2-5,['R^2: ' num2str(R2)]);
6059

6160
legend(data_sets);
6261
xlabel('Experimental 100 \cdot v_i/v_{Glx}','FontSize',14,'FontName','Helvetica')

code/modelTests/anaerobiosis.m

Lines changed: 61 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,83 @@
11
clear; close all
2-
% Load the model and apply the corrections for *all* models
2+
% Load the old and new model
33
model902 = getEarlierModelVersion('9.0.2');
4-
cd('../modelCuration/')
5-
v9_1_0;
4+
model910 = loadYeastModel();
65

76
%% Run growth tests
8-
R2new = growth(model);
9-
R2old = growthOld(model);
10-
% R increased from 0.8528 to 0.9085
7+
funcs = {@growth, @growthOld, @growth, @growthOld};
8+
models = {model910, model910, model902, model902};
9+
titles = {'v9.1.0 model, new anaerobic script', ...
10+
'v9.1.0 model, old anaerobic script', ...
11+
'v9.0.2 model, new anaerobic script', ...
12+
'v9.0.2 model, old anaerobic script'};
1113

12-
% Repeat with the model *before* generic 9.1.0 curations were done
13-
R2new902 = growth(model902);
14-
R2old902 = growthOld(model902);
15-
% R decreased from 0.8256 to 0.9001
14+
fig1 = figure('Name', 'Growth Comparison', 'Position', [100 100 1000 800]);
15+
for k = 1:4
16+
subplot(2,2,k);
17+
funcs{k}(models{k});
18+
title(titles{k});
19+
end
20+
sgtitle('Growth: v9.1.0 vs v9.0.2, new vs old anaerobic script');
21+
saveas(fig1, '..\..\data\testResults\v910_growth.png');
22+
23+
% R2 of growth prediction increased from 0.8256 to 0.9085 as result of all
24+
% curations.
1625

1726
%% Convert to anaerobic
1827
cd('../otherChanges/')
19-
modelAn = anaerobicModel(model);
20-
modelAnOld = anaerobicModelOld(model);
28+
modelAn910 = anaerobicModel(model910);
29+
modelAnOld910 = anaerobicModelOld(model910);
2130
modelAn902 = anaerobicModel(model902);
2231
modelAnOld902 = anaerobicModelOld(model902);
2332

33+
%% Anaerobic flux predictions
2434
cd('../modelTests/');
25-
%% flux predictions
26-
R2fluxnew = anaerobic_flux_predictions(modelAn);
27-
R2fluxold = anaerobic_flux_predictions(modelAnOld);
28-
R2fluxnew902 = anaerobic_flux_predictions(modelAn902);
29-
R2fluxold902 = anaerobic_flux_predictions(modelAnOld902);
30-
% R
35+
models = {modelAn910, modelAnOld910, modelAn902, modelAnOld902};
36+
titles = {'v9.1.0 model, new anaerobic script', ...
37+
'v9.1.0 model, old anaerobic script', ...
38+
'v9.0.2 model, new anaerobic script', ...
39+
'v9.0.2 model, old anaerobic script'};
40+
fig2 = figure('Name', 'Anaerobic Comparison', 'Position', [100 100 1000 800]);
41+
for k = 1:4
42+
subplot(2,2,k);
43+
anaerobic_flux_predictions(models{k});
44+
title(titles{k});
45+
end
46+
sgtitle('Anaerobic flux predictions: v9.1.0 vs v9.0.2, new vs old anaerobic script');
47+
saveas(fig2, '..\..\data\testResults\v910_anaerobic_fluxes.png');
3148

49+
% R2 of flux predictions increased from 0.7858 to 0.9175 as a response to
50+
% all curations
3251

3352
%% Plot
34-
plotAnaerobic(modelAn)
53+
models = {modelAn910, modelAnOld910, modelAn902, modelAnOld902};
54+
titles = {'v9.1.0 model, new anaerobic script', ...
55+
'v9.1.0 model, old anaerobic script', ...
56+
'v9.0.2 model, new anaerobic script', ...
57+
'v9.0.2 model, old anaerobic script'};
58+
fig3 = figure('Name', 'Anaerobic Comparison', 'Position', [100 100 1000 800]);
59+
for k = 1:4
60+
subplot(2,2,k);
61+
plotAnaerobic(models{k});
62+
title(titles{k});
63+
end
64+
sgtitle('Anaerobic fluxes (Sjöberg data): v9.1.0 vs v9.0.2, new vs old anaerobic script');
65+
saveas(fig3, '..\..\data\testResults\v910_anaerobic_sjoberg.png');
66+
3567
%% Set glucose uptake rate and solve pFBA
36-
modelAn = setParam(modelAn,'eq','r_1714',-23);
37-
res=solveLP(modelAn,1);
38-
FLUX = res.x;
39-
v_AStr = res.x(getIndexes(modelAn,'r_1115','rxns'));
40-
v_ATPase = res.x(getIndexes(modelAn,'r_0227','rxns'));
41-
v_glc = res.x(getIndexes(modelAn,'r_1714','rxns'));
68+
temp_model = setParam(modelAn910,'eq','r_1714',-23);
69+
res=solveLP(temp_model,1); FLUX = res.x;
70+
71+
v_AStr = res.x(getIndexes(temp_model,'r_1115','rxns')); % Ammonium exchange
72+
v_ATPase = res.x(getIndexes(temp_model,'r_0227','rxns')); % ATPase
73+
v_glc = res.x(getIndexes(temp_model,'r_1714','rxns')); % Glucose uptake
74+
[v_AStr, v_ATPase, v_glc]
4275

4376
%% Pack flux results into table
44-
temp_model=modelAn;
45-
rxns_reacs=constructEquations(temp_model,modelAn.rxns);
46-
tab=table(modelAn.rxns,modelAn.rxnNames,rxns_reacs,abs(FLUX./v_glc),FLUX,modelAn.grRules);
77+
rxns_reacs=constructEquations(temp_model,temp_model.rxns);
78+
tab=table(temp_model.rxns,temp_model.rxnNames,rxns_reacs,abs(FLUX./v_glc),FLUX,temp_model.grRules);
4779

48-
[massImbalance, imBalancedMass, imBalancedCharge, imBalancedRxnBool, elements, missingFormulaeBool, balancedMetBool] = checkMassChargeBalance(modelAn);
80+
[massImbalance, imBalancedMass, imBalancedCharge, imBalancedRxnBool, elements, missingFormulaeBool, balancedMetBool] = checkMassChargeBalance(temp_model);
4981

5082
tabImbalance = [tab,table(imBalancedRxnBool,imBalancedCharge,imBalancedMass)];
5183
tabImbalance(~imBalancedRxnBool,:) = [];

code/modelTests/anaerobiosis.mlx

-611 KB
Binary file not shown.

code/modelTests/growth.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
mod_data(27:32,:) = simulateChemostat(model_origin,exp_data(27:32,:),2,'N');
3737

3838
% plot the figure
39-
figure
4039
hold on
4140
cols = [215,25,28;253,174,97;171,217,233;44,123,182]/256;
4241
b(1) = plot(exp_data(1:9,4),mod_data(1:9,4),'o','MarkerSize',10,'MarkerEdgeColor','k','MarkerFaceColor',cols(2,:));
@@ -60,6 +59,7 @@
6059
hold off
6160
R2=corrcoef(exp_data(:,4),mod_data(:,4));
6261
R2=R2(2)^2;
62+
text(0.25,0.1,['R2:',num2str(R2)])
6363

6464
if writeOutput
6565
saveas(gcf,fullfile(funcDir,'..','..','data','testResults','growth.png'));

code/modelTests/growthOld.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
mod_data(27:32,:) = simulateChemostat(model_origin,exp_data(27:32,:),2,'N');
3737

3838
% plot the figure
39-
figure
4039
hold on
4140
cols = [215,25,28;253,174,97;171,217,233;44,123,182]/256;
4241
b(1) = plot(exp_data(1:9,4),mod_data(1:9,4),'o','MarkerSize',10,'MarkerEdgeColor','k','MarkerFaceColor',cols(2,:));
@@ -60,6 +59,7 @@
6059
hold off
6160
R2=corrcoef(exp_data(:,4),mod_data(:,4));
6261
R2=R2(2)^2;
62+
text(0.25,0.1,['R2:',num2str(R2)])
6363

6464
if writeOutput
6565
saveas(gcf,fullfile(funcDir,'..','..','data','testResults','growth.png'));

code/modelTests/plotAnaerobic.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function plotAnaerobic(modelAn)
1212
v_AStr = FLUX(getIndexes(modelAn,'r_1115','rxns'));
1313
v_ATPase = FLUX(getIndexes(modelAn,'r_0227','rxns'));
1414
%% Show relative accuracy of main extracellular products
15-
figure;
15+
%figure;
1616
%glycerol ethanol Co2
1717
%4.5 ± 0.4 31 ± 2 38 ± 10
1818
data=[4.5 31 38 0.36];
139 KB
Loading
70.3 KB
Loading

data/testResults/v910_growth.png

152 KB
Loading

0 commit comments

Comments
 (0)