Skip to content

Commit

Permalink
feat: include manual curation in reconstruction script
Browse files Browse the repository at this point in the history
  • Loading branch information
edkerk committed Jul 5, 2019
1 parent 08ab397 commit b50183c
Show file tree
Hide file tree
Showing 4 changed files with 2,982 additions and 2,387 deletions.
89 changes: 61 additions & 28 deletions ComplementaryScripts/reconstructionProtocol.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@
otherwise would have wanted to clear out.
%}

% Ensure that the lower bounds of non-growth associated maintenance and
% biomass formation reactons are set to zero, to make sure we are will not
% force our draft model to produce biomass or regenerate ATP at rates that
% it cannot support.
modelSce = setParam(modelSce, 'lb', {'r_4041', 'r_4046'}, 0);
modelSce = setParam(modelSce, 'ub', {'r_4041', 'r_4046'}, 1000);
modelRhto = setParam(modelRhto, 'lb', {'r_4041', 'r_4046'}, 0);
modelRhto = setParam(modelRhto, 'ub', {'r_4041', 'r_4046'}, 1000);

% It can be useful to store intermediate states of the MATLAB environment.
% We will store these in the 'scrap' folder, loading them the next time
% will then allow us to continue from this point.
Expand Down Expand Up @@ -127,7 +118,7 @@
model = addRxnsGenesMets(model, modelSce, mediumComps);

% You might want to inspect your first draft model!
exportToExcelFormat(model, [scrap 'hanpo_step3.3.xlsx']);
exportToExcelFormat(model, [root 'scrap/hanpo_step3.3.xlsx']);

% Save workspace
save([root 'scrap/homology.mat'])
Expand Down Expand Up @@ -332,22 +323,64 @@
run([scripts 'curation/cleanupModel']);

newCommit(model);
%% MANUAL CURATION
% Growth on methanol and glucose mixture. Add reversible exchange reactions
model = addRxnsGenesMets(model,modelSce,{'r_1714','r_4494'});
model = setParam(model,'rev',{'r_1714','r_4494'},1);
model = setParam(model,'lb',{'r_1714','r_4494'},0);
model = setParam(model,'lb','r_1808',0); % No glycerol

[model2,gam] = fitGAM(model);

% Curate some other reactions

% Save workspace
save([root 'scrap/curation.mat'])
% load([root 'scrap/curation.mat'])


%% 3.7 SIMULATIONS

%% 3.8 SIMULATIONS
% To perform simple FBA, use solveLP
sol = solveLP(model,1);
% Flux distributions can be displayed by printFluxes:
printFluxes(model, sol.x, false);

%% 3.9 MANUAL CURATION
% Modify gene associations of gap-filled reactions. Find reactions
% annotationed with R. toruloides genes.
rhtoRxns = find(contains(model.grRules,'RHTO'));
model.rxnNames(rhtoRxns);
model.grRules(rhtoRxns);

% By BLAST we identify that the gene RHTO_03911 has a homolog in H.
% polymorpha: Hanpo2_15704. We will therefore replace the current grRule
% with the H. polymorpha gene:
model = changeGrRules(model, 'y300009', 'Hanpo2_15704', true);

% Curate the model so it can support growth on methanol. Reactions required
% for methanol assimilation:
% 1. methanol oxidase: methanol[p] + oxygen[p] => formaldehyde[p] + hydrogen peroxide[p]
% 2. dihydroxyacetone synthase: formaldehyde[p] + D-xylulose 5-phosphate[p] => glyceraldehyde 3-phosphate[p] + glycerone[p]
% 3. formate dehydrogenase: formate[c] + NAD[c] => carbon dioxide[c] + NADH[c]
% 4. peroxisomal catalase: 2 hydrogen peroxide[p] => 2 H2O[p] + oxygen[p]
% 5. dihydroxyacetone kinase: ATP[c] + glycerone[c] => ADP[c] + dihydroxyacetone phosphate[c] + H+[c]
% Reactions 3-5 are already present in model, manually add reactions 1 & 2:
rxnsToAdd.rxns = {'MOX', 'DAS'};
rxnsToAdd.equations = {'methanol[p] + oxygen[p] => formaldehyde[p] + hydrogen peroxide[p]',...
'formaldehyde[p] + D-xylulose 5-phosphate[p] => glyceraldehyde 3-phosphate[p] + glycerone[p]'};
rxnsToAdd.rxnNames = {'methanol oxidase','dihydroxyacetone synthase'};
rxnsToAdd.lb = [0,0];
rxnsToAdd.ub = [1000,1000];
rxnsToAdd.eccodes = {'1.1.3.13','2.2.1.3'};
rxnsToAdd.grRules = {'Hanpo2_76277','Hanpo2_95557'};
rxnsToAdd.rxnNotes = {'Methanol metabolism reaction added by manual curation',
'Methanol metabolism reaction added by manual curation'};

model = addRxns(model,rxnsToAdd,3,'',true,true);

% Add methanol (and glucose, was also absent) exchange reactions, and
% diffusion of oxygen and H2O to peroxisome:
model = addRxnsGenesMets(model,modelSce,{'r_4494','r_4391','r_1714','r_1980','r_2098'});
model = setParam(model, 'rev', {'r_4494', 'r_4391'}, 1);
model = setParam(model, 'lb', {'r_4494', 'r_4391'}, -1000);

% Add transport reactions between cytoplasm and peroxisome
model = addTransport(model,'c','p',{'D-xylulose 5-phosphate'...
'methanol', 'glycerone', 'glyceraldehyde 3-phosphate'},true,false,'t_');

% Confirm that growth on methanol is possible
% Ensure glycerol/other carbon source uptake is not allowed
model = setParam(model,'eq',{'r_1808','r_1714'},0);

% Ensure methanol uptake is allowed
model = setParam(model,'lb','r_4494',-1);

% Verify that model can grow
sol=solveLP(model,1)
printFluxes(model,sol.x)

newCommit(model);
19 changes: 16 additions & 3 deletions ModelFiles/txt/hanpo-GEM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ y300056 s_0803 + m_0033 -> 2 s_0563 Hanpo2_12856 or Hanpo2_15968 or Hanpo2_172
y300063 s_0750 + s_0803 <=> s_0983 + s_0991 Hanpo2_98449 -1000.00 1000.00 0.00
r_1654 s_0420 <=> -1000.00 1000.00 0.00
r_1672 s_0458 -> 0.00 1000.00 0.00
r_1808 s_0766 <=> -1.00 1000.00 0.00
r_1808 s_0766 -> 0.00 0.00 0.00
r_1832 s_0796 <=> -1000.00 1000.00 0.00
r_1861 s_0925 <=> -1000.00 1000.00 0.00
r_1992 s_1277 <=> -1000.00 1000.00 0.00
Expand Down Expand Up @@ -2244,14 +2244,14 @@ r_0501 s_1005 + s_1200 + s_1488 -> s_0307 + s_0421 + s_0460 + s_1205 YAL044C a
r_0678 s_0434 + s_0794 + s_0953 + s_1212 -> s_0423 + s_0633 + s_0959 + s_1207 YBR115C and YGL154C 0.00 1000.00 0.00
r_0692 s_1045 -> s_0178 + s_0419 YCL064C 0.00 1000.00 0.00
r_0736 s_0028 + s_0539 -> s_0019 + s_0467 + s_0794 YMR208W 0.00 1000.00 0.00
r_0738 s_0028 + s_1559 -> s_0019 + s_0794 + s_1538 YMR208W 0.00 1000.00 0.00
r_0757 s_0126 + s_0803 -> s_1153 + s_1322 YDR287W or YHR046C 0.00 1000.00 0.00
r_0883 s_0201 + s_1616 -> s_0390 + 2 s_0794 + s_1469 + s_1620 ( YGR209C and YPR167C ) or ( YLR043C and YPR167C ) 0.00 1000.00 0.00
r_0938 s_0794 + s_1377 -> s_0456 + s_0803 + s_0951 YNL316C 0.00 1000.00 0.00
r_0942 3 s_1278 + 2 s_1385 -> 6 s_0807 + 2 s_1383 YER014W 0.00 1000.00 0.00
r_1179 s_0924 -> s_0926 0.00 1000.00 0.00
r_2034 s_0794 + s_1399 -> s_0799 + s_1401 ( YGL080W and YGR243W ) or ( YGL080W and YHR162W ) 0.00 1000.00 0.00
r_1567 s_0349 <=> s_0350 -1000.00 1000.00 0.00
r_1585 s_0178 <=> s_0179 -1000.00 1000.00 0.00
r_1596 s_0056 <=> s_0060 -1000.00 1000.00 0.00
r_1622 s_0315 <=> s_0317 -1000.00 1000.00 0.00
r_1696 s_0456 <=> s_0460 -1000.00 1000.00 0.00
Expand Down Expand Up @@ -2279,6 +2279,7 @@ r_2032 s_0633 <=> s_0636 -1000.00 1000.00 0.00
r_2045 s_1039 <=> s_1042 -1000.00 1000.00 0.00
r_2053 s_1447 <=> s_1448 -1000.00 1000.00 0.00
r_2054 s_0038 <=> s_0037 -1000.00 1000.00 0.00
r_2072 s_1045 -> s_1047 0.00 1000.00 0.00
r_2093 s_1056 <=> s_1058 -1000.00 1000.00 0.00
r_2094 s_0803 <=> s_0804 -1000.00 1000.00 0.00
r_2096 s_0803 <=> s_0807 -1000.00 1000.00 0.00
Expand All @@ -2305,7 +2306,19 @@ r_3548 s_1413 <=> s_3183 -1000.00 1000.00 0.00
r_3669 s_0456 <=> s_3129 -1000.00 1000.00 0.00
r_3957 s_0799 <=> s_3094 -1000.00 1000.00 0.00
r_4040 s_0811 <=> s_3714 -1000.00 1000.00 0.00
r_4046_sce s_0434 + s_0803 -> s_0394 + s_0794 + s_1322 0.70 0.70 0.00
t_0001 5 s_0799 + s_1205 + s_1537 -> 4 s_0794 + s_1200 + s_1535 RHTO_00906 and RHTO_00668 and RHTO_07027 0.00 1000.00 0.00
y200003 s_0434 + s_0522 + s_0529 -> s_0373 + s_0394 + s_1271 + s_1322 RHTO_03915 and RHTO_03915 0.00 1000.00 0.00
y300009 s_2783 + s_2817 + s_2818 + s_2821 -> 2 s_2808 + s_2820 + m_0130 RHTO_03911 0.00 1000.00 0.00
y300009 s_2783 + s_2817 + s_2818 + s_2821 -> 2 s_2808 + s_2820 + m_0130 Hanpo2_15704 0.00 1000.00 0.00
y300057 s_0803 + s_0997 + s_1198 <=> s_0794 + s_0991 + s_1203 RHTO_07378 -1000.00 1000.00 0.00
MOX s_1279 + m_0349 -> s_0840 + m_0346 Hanpo2_76277 0.00 1000.00 0.00
DAS m_0345 + m_0346 -> m_0347 + m_0348 Hanpo2_95557 0.00 1000.00 0.00
r_4494 s_4124 <=> -1.00 1000.00 0.00
r_4391 s_4123 <=> s_4124 -1000.00 1000.00 0.00
r_1714 s_0565 -> 0.00 0.00 0.00
r_1980 s_1275 <=> s_1279 -1000.00 1000.00 0.00
r_2098 s_0803 <=> s_0809 -1000.00 1000.00 0.00
t_0684 s_0581 <=> m_0345 -1000.00 1000.00 0.00
t_0685 s_4123 <=> m_0349 -1000.00 1000.00 0.00
t_0686 s_0771 <=> m_0348 -1000.00 1000.00 0.00
t_0687 s_0764 <=> m_0347 -1000.00 1000.00 0.00
Loading

0 comments on commit b50183c

Please sign in to comment.