testPathway

PURPOSE ^

this gapfiling function allows the user to see if given one metabolite A,

SYNOPSIS ^

function [Flux FBAsolution model]= testPathway(model, MetIn,MetOut,AdditionalMetsInorOut,ObjectiveOption)

DESCRIPTION ^

 this gapfiling function allows the user to see if given one metabolite A,
 downstream metabolite B can be made made. Additional sinks can be added
 for co-factors if needed
           A -->-->-->-->--> B
INPUTS
 model                 COBRA model structure
 MetIn                 The input metabolite(s) (A)
 MetOut                The output metabolite (B)

OPTIONAL INPUTS
 AdditionalMetsInorOut Additional metabolites for which sinks will be added
 ObjectiveOption       1 = objective will be production of B (default)
                       0 = use objective in model
 
OUTPUTS
 Flux                  The rate of B production
 FBAsolution           
 model                 COBRA model with sinks in it
 
 Nathan Lewis Feb 16 2009

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Flux FBAsolution model]= testPathway(model, MetIn,MetOut,AdditionalMetsInorOut,ObjectiveOption)
0002 % this gapfiling function allows the user to see if given one metabolite A,
0003 % downstream metabolite B can be made made. Additional sinks can be added
0004 % for co-factors if needed
0005 %           A -->-->-->-->--> B
0006 %INPUTS
0007 % model                 COBRA model structure
0008 % MetIn                 The input metabolite(s) (A)
0009 % MetOut                The output metabolite (B)
0010 %
0011 %OPTIONAL INPUTS
0012 % AdditionalMetsInorOut Additional metabolites for which sinks will be added
0013 % ObjectiveOption       1 = objective will be production of B (default)
0014 %                       0 = use objective in model
0015 %
0016 %OUTPUTS
0017 % Flux                  The rate of B production
0018 % FBAsolution
0019 % model                 COBRA model with sinks in it
0020 %
0021 % Nathan Lewis Feb 16 2009
0022 
0023 if ~iscell(MetIn)
0024     Met = MetIn; clear MetIn; MetIn{1} = Met;
0025 end
0026 if ~iscell(MetOut)
0027     Met = MetOut; clear MetOut; MetOut{1} = Met;
0028 end
0029 if nargin > 3
0030     if ~iscell(AdditionalMetsInorOut)
0031         Met = AdditionalMetsInorOut; clear AdditionalMetsInorOut; AdditionalMetsInorOut{1} = Met;
0032     end
0033     % add sink rxns for all AdditionalMetsInorOut
0034     for i = 1:length(AdditionalMetsInorOut)
0035         model = addReaction(model,cat(2,'Tempsink_',AdditionalMetsInorOut{i}),{AdditionalMetsInorOut{i} },-1 ,true);
0036     end
0037 end
0038 if nargin <5,ObjectiveOption=1;end
0039 
0040 for i = 1:length(MetIn) % add inputs
0041     model = addReaction(model,cat(2,'TempInput_',MetIn{i}),{MetIn{i} },1 ,false);
0042 end
0043 model = addReaction(model,cat(2,'TempOutput_',MetOut{1}),{MetOut{1} },-1 ,false);
0044 if ObjectiveOption==1,model = changeObjective(model,cat(2,'TempOutput_',MetOut{1}));end
0045 FBAsolution = optimizeCbModel(model,'max');
0046 Flux = FBAsolution.f;
0047 if ~isempty(FBAsolution.x)
0048 printFluxVector(model,FBAsolution.x);
0049 else display('zero flux in network')
0050 end

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003