0001
0002
0003
0004
0005
0006
0007
0008
0009 model=importExcelModel('smallYeastBad.xlsx');
0010
0011
0012 model=setParam(model,'eq',{'glcIN', 'o2IN'},[0 0]);
0013 model=setParam(model,'obj',{'acOUT' 'biomassOUT' 'co2OUT' 'ethOUT' 'glyOUT'},[1 1 1 1 1]);
0014 sol=solveLP(model);
0015 printFluxes(model,sol.x,true);
0016
0017
0018 rxns.rxns={'FREE_ATP';'FREE_NADH';'FREE_NADPH'};
0019 rxns.equations={'ATP <=> ADP + phosphate';'NAD(+) <=> NADH';'NADP(+) <=> NADPH'};
0020 model=addRxns(model,rxns,2,'c');
0021 sol=solveLP(model,1);
0022
0023
0024
0025 printFluxes(model,sol.x,false,[],[],'%rxnID (%rxnName):%flux\n\t%eqn\n');
0026
0027
0028
0029 model=changeRxns(model,'ADH1','acetaldehyde[c] + NADH[c] => ethanol[c] + NAD(+)[c]',3);
0030 sol=solveLP(model,1);
0031 printFluxes(model,sol.x,true);
0032
0033
0034 model.b=[model.b inf(numel(model.b),1)];
0035 sol=solveLP(model,1);
0036 printFluxes(model,sol.x,false,10^-5,[],'%rxnID (%rxnName):\n\t%eqn\n\t%flux\n');
0037
0038
0039
0040
0041 model=changeRxns(model,'FBP','beta-D-fructofuranose 1,6-bisphosphate[c] => beta-D-fructofuranose 6-phosphate[c] + phosphate[c]',3);
0042 sol=solveLP(model,1);
0043 printFluxes(model,sol.x,false,10^-5,[],'%rxnID (%rxnName):\n\t%eqn\n\t%flux\n');
0044
0045
0046
0047 model=changeRxns(model,'PFK','ATP[c] + beta-D-fructofuranose 6-phosphate[c] => ADP[c] + beta-D-fructofuranose 1,6-bisphosphate[c]',3);
0048 sol=solveLP(model,1);
0049 printFluxes(model,sol.x,false,10^-5,[],'%rxnID (%rxnName):\n\t%eqn\n\t%flux\n');
0050
0051
0052 model=setParam(model,'eq',getExchangeRxns(model),0);
0053
0054
0055
0056 model.b=model.b(:,1);
0057 I=canConsume(model);
0058 disp(model.mets(I));
0059
0060
0061 model.b=[ones(numel(model.b),1)*-1000 model.b];
0062
0063
0064 model=setParam(model,'eq',{'co2OUT'},-1);
0065 sol=solveLP(model);
0066 printFluxes(model,sol.x,false,10^-5,[],'%rxnID (%rxnName):\n\t%eqn\n\t%flux\n');
0067
0068
0069
0070
0071
0072
0073
0074 Irxn=ismember(model.rxns,'PDC');
0075 Imet=ismember(model.mets,'CO2_c');
0076 model.S(Imet,Irxn)=1;
0077
0078
0079 constructEquations(model,Irxn)
0080
0081
0082
0083 sol=solveLP(model);
0084
0085
0086 model=importExcelModel('smallYeastBad2.xlsx',true,false,true);
0087 [reducedModel, deletedReactions, deletedMetabolites]=simplifyModel(model,false,false,false,true);
0088 disp(deletedReactions);
0089 disp(deletedMetabolites);
0090
0091
0092
0093
0094
0095 Igood=ismember(model.mets,'G15L_c');
0096 Ibad=ismember(model.mets,'G15Lc');
0097
0098
0099
0100 model.S(Igood,:)=model.S(Igood,:)+model.S(Ibad,:);
0101
0102
0103 model=removeMets(model,'G15Lc');
0104 [reducedModel, deletedReactions, deletedMetabolites]=simplifyModel(model,false,false,false,true);
0105 disp(deletedReactions);
0106 disp(deletedMetabolites);
0107
0108
0109
0110
0111 [notProducedMets, ~, neededForProductionMat, minToConnect]=checkProduction(model,true,model.comps,false);
0112
0113
0114
0115
0116
0117 disp(minToConnect);
0118
0119
0120
0121
0122 Igood=ismember(model.mets,'DHAP_c');
0123 Ibad=ismember(model.mets,'GLYP_c');
0124
0125
0126
0127 model.S(Igood,:)=model.S(Igood,:)+model.S(Ibad,:);
0128
0129
0130 model=removeMets(model,'GLYP_c');
0131 [reducedModel, deletedReactions, deletedMetabolites]=simplifyModel(model,false,false,false,true);
0132 disp(deletedReactions);
0133 disp(deletedMetabolites);
0134 [notProducedMets, ~, neededForProductionMat, minToConnect]=checkProduction(model,true,model.comps,false);
0135 disp(minToConnect);
0136
0137
0138
0139
0140 refModel=importExcelModel('smallYeast.xlsx');
0141 [newConnected, cannotConnect, addedRxns, newModel]=fillGaps(model,{refModel},false);
0142 disp(addedRxns);
0143 disp(newConnected);
0144
0145
0146
0147 [reducedModel, deletedReactions, deletedMetabolites]=simplifyModel(newModel,false,false,false,true);
0148 disp(deletedMetabolites);
0149 disp(deletedReactions);
0150
0151
0152
0153
0154 model=importExcelModel('smallYeastBad2.xlsx',true,false,true);
0155 gapReport(model,{refModel});