addExchangeRxn

PURPOSE ^

addExchangeRxn adds exchange reactions

SYNOPSIS ^

function newModel = addExchangeRxn(model,metList,lb,ub)

DESCRIPTION ^

addExchangeRxn adds exchange reactions

 newModel = addExchangeRxn(model,metList,lb,ub)

INPUTS
 model         Cobra model structure
 metList       List of metabolites

OPTIONAL INPUTS
 lb            Array of lower bounds
 ub            Array of upper bounds

OUTPUT
 newModel      COBRA model with added exchange reactions

 Ines Thiele 02/2009

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function newModel = addExchangeRxn(model,metList,lb,ub)
0002 %addExchangeRxn adds exchange reactions
0003 %
0004 % newModel = addExchangeRxn(model,metList,lb,ub)
0005 %
0006 %INPUTS
0007 % model         Cobra model structure
0008 % metList       List of metabolites
0009 %
0010 %OPTIONAL INPUTS
0011 % lb            Array of lower bounds
0012 % ub            Array of upper bounds
0013 %
0014 %OUTPUT
0015 % newModel      COBRA model with added exchange reactions
0016 %
0017 % Ines Thiele 02/2009
0018 
0019 if nargin < 3
0020     lb = ones(length(metList),1)*min(model.lb);
0021 end
0022 if nargin < 4
0023     ub = ones(length(metList),1)*max(model.ub);
0024 end
0025 Revs = zeros(length(metList),1);
0026 Revs(lb<0) = 1;
0027 
0028 newModel = model;
0029 for i = 1 : length(metList)
0030     [newModel] = addReaction(newModel,strcat('Ex_',metList{i}),metList(i),-1,Revs(i),lb(i),ub(i));
0031 end

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