Home > tutorial > tutorial3.m

tutorial3

PURPOSE ^

tutorial3

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 tutorial3
   This exercise shows how to run FBA and minimization of metabolic
   adjustment (MOMA) simulations and how one can use GEMs as a scaffold
   for interpreting microarray data. A simplified model of yeast
   metabolism is used in this approach as an example.
   See Tutorial 3 in "RAVEN tutorials.docx" for more details.

   It is assumed that the user has already completed Tutorial 2

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % tutorial3
0002 %   This exercise shows how to run FBA and minimization of metabolic
0003 %   adjustment (MOMA) simulations and how one can use GEMs as a scaffold
0004 %   for interpreting microarray data. A simplified model of yeast
0005 %   metabolism is used in this approach as an example.
0006 %   See Tutorial 3 in "RAVEN tutorials.docx" for more details.
0007 %
0008 %   It is assumed that the user has already completed Tutorial 2
0009 
0010 %Import the Excel model
0011 model=importExcelModel('smallYeast.xlsx',true);
0012 
0013 %Set the upper bound of glucose uptake to 1 and O2 uptake to unlimited
0014 model=setParam(model,'ub',{'glcIN' 'o2IN'},[1 1000]);
0015 
0016 %Set the objective to be ethanol production
0017 model=setParam(model,'obj',{'ethOUT'},1);
0018 
0019 %Solve the model
0020 sol=solveLP(model);
0021 
0022 %Print the resulting exchange fluxes
0023 printFluxes(model,sol.x,true);
0024 
0025 %Compare two flux distributions by loading the map
0026 load 'pathway.mat' pathway;
0027 drawMap('Aerobic vs Anaerobic',pathway,model,solA.x,solB.x,[],'mapFBA.pdf',10^-5);
0028 
0029 %Run a single gene deletion
0030 [genes, fluxes, originalGenes, details]=findGeneDeletions(model,'sgd','fba');
0031 
0032 %Get the indexes of these reactions
0033 I=getIndexes(model,{'biomassOUT'},'rxns');
0034 J=getIndexes(model,{'glyOUT'},'rxns');
0035 
0036 okSolutions=find(fluxes(I,:)>10^-2); %Only look at solutions which are still growing
0037 [maxGlycerol, J]=max(fluxes(J,okSolutions));
0038 disp(maxGlycerol);
0039 disp(originalGenes(genes(okSolutions(J),:)));
0040 
0041 %Draw map for the ZWF1 deletion strain
0042 model2=setParam(model,'eq',{'ZWF'},0);
0043 sol2=solveLP(model2);
0044 drawMap('ZWF1 deletion vs WT',pathway,model,sol.x,sol2.x,[],'mapZWF.pdf',10^-5);
0045 followChanged(model,sol2.x,sol.x, 10, 10^-2, 0,{'NADPH' 'NADH' 'NAD' 'NADP'});
0046 
0047 %Import the model
0048 SBMLFromExcel('smallYeast.xlsx','smallYeast.xml')
0049 model=importModel('smallYeast.xml',true);
0050 sol=solveLP(model);
0051 
0052 %Define another model where all exchange reactions are open
0053 model2=model;
0054 I=getIndexes(model,getExchangeRxns(model),'rxns');
0055 model2.lb(I)=0;
0056 model2.ub(I)=1000;
0057 
0058 %Delete ZWF gene
0059 model2=setParam(model2,'eq',{'ZWF'},0);
0060 
0061 %Run MOMA
0062 [fluxA, fluxB, flag]=qMOMA(model,model2);
0063 drawMap('Aerobic vs Anaerobic MOMA',pathway,model,fluxA,fluxB,[],'mapMOMA.pdf',10^-5);
0064 
0065 %Read microarray results and calculate reporter metabolites (metabolites
0066 %around which there are significant transcriptional changes)
0067 [orfs, pvalues]=textread('expression.txt','%s%f');
0068 repMets=reporterMetabolites(model,orfs,pvalues);
0069 [I, J]=sort(repMets.metPValues);
0070 
0071 fprintf('TOP 10 REPORTER METABOLITES:\n');
0072 for i=1:min(numel(J),10)
0073     fprintf([repMets.mets{J(i)} '\t' num2str(I(i)) '\n']);
0074 end
0075 
0076 %Get all reactions involving those metabolites and display them on a map
0077 mets=ismember(model.mets,repMets.mets(J(1:10)));
0078 [~, I]=find(model.S(mets,:));
0079 pathway=trimPathway(pathway, model.rxns(I), true);
0080 drawMap('Reactions involving the top 10 Reporter Metabolites',pathway,model,ones(numel(model.rxns),1),zeros(numel(model.rxns),1),[],'mapRM.pdf',10^-5);

Generated by m2html © 2005