findRxnsFromMets

PURPOSE ^

findRxnsFromMets returns a list of reactions in which at least one

SYNOPSIS ^

function [rxnList, rxnFormulaList] = findRxnsFromMets(model, metList, verbFlag)

DESCRIPTION ^

findRxnsFromMets returns a list of reactions in which at least one
metabolite listed in metList participates.

 [rxnList, rxnFormulaList] = findRxnsFromMets(model, metList, verbFlag)

INPUTS
 model             COBRA model structure
 metList           Metabolite list

OPTIONAL INPUT
 verbFlag          Print reaction formulas to screen (Default = false)

OUTPUTS
 rxnList           List of reactions
 rxnFormulaList    Reaction formulas coresponding to rxnList

Richard Que (08/12/2010)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [rxnList, rxnFormulaList] = findRxnsFromMets(model, metList, verbFlag)
0002 %findRxnsFromMets returns a list of reactions in which at least one
0003 %metabolite listed in metList participates.
0004 %
0005 % [rxnList, rxnFormulaList] = findRxnsFromMets(model, metList, verbFlag)
0006 %
0007 %INPUTS
0008 % model             COBRA model structure
0009 % metList           Metabolite list
0010 %
0011 %OPTIONAL INPUT
0012 % verbFlag          Print reaction formulas to screen (Default = false)
0013 %
0014 %OUTPUTS
0015 % rxnList           List of reactions
0016 % rxnFormulaList    Reaction formulas coresponding to rxnList
0017 %
0018 %Richard Que (08/12/2010)
0019 
0020 if nargin < 3 || isempty(verbFlag), verbFlag = false; end
0021 
0022 %Find met indicies
0023 [isMet index] = ismember(metList,model.mets);
0024 index = index(isMet);
0025 %expand rxns list for logical indexing
0026 rxns = repmat(model.rxns,1,length(index));
0027 %find reactions
0028 rxnList = unique(rxns(model.S(index,:)'~=0));
0029 if nargout > 1
0030     rxnFormulaList = printRxnFormula(model,rxnList,verbFlag);
0031 end

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