addDemandReaction

PURPOSE ^

addDemandReaction adds demand reactions for a set of metabolites

SYNOPSIS ^

function [model,rxnNames] = addDemandReaction(model,metaboliteNameList)

DESCRIPTION ^

 addDemandReaction adds demand reactions for a set of metabolites
 The reaction names for the demand reactions will be DM_[metaboliteName]

 model = addDemandReaction(model,metaboliteNameList)

 INPUTS
 model                 COBRA model structure
 metaboliteNameList    List of metabolite names (cell array)

 OUTPUTS
 model                 COBRA model structure with added demand reactions
 rxnNames              List of added reactions

 Markus Herrgard 5/8/07
 Ines Thiele 03/09 - Corrected reaction coefficient for demand reaction

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [model,rxnNames] = addDemandReaction(model,metaboliteNameList)
0002 % addDemandReaction adds demand reactions for a set of metabolites
0003 % The reaction names for the demand reactions will be DM_[metaboliteName]
0004 %
0005 % model = addDemandReaction(model,metaboliteNameList)
0006 %
0007 % INPUTS
0008 % model                 COBRA model structure
0009 % metaboliteNameList    List of metabolite names (cell array)
0010 %
0011 % OUTPUTS
0012 % model                 COBRA model structure with added demand reactions
0013 % rxnNames              List of added reactions
0014 %
0015 % Markus Herrgard 5/8/07
0016 % Ines Thiele 03/09 - Corrected reaction coefficient for demand reaction
0017 
0018 if (~iscell(metaboliteNameList))
0019     tmp = metaboliteNameList;
0020     clear metaboliteNameList;
0021     metaboliteNameList{1} = tmp;
0022 end
0023 
0024 for i = 1:length(metaboliteNameList)
0025     rxnName = ['DM_' metaboliteNameList{i}];
0026     rxnNames{i}=rxnName;
0027     metaboliteList = {metaboliteNameList{i}};
0028     model = addReaction(model,rxnName,metaboliteList,-1,false,0,1000,0,'Demand');
0029 end

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