findRxnIDs

PURPOSE ^

findRxnIDs Find reaction numbers in a model

SYNOPSIS ^

function rxnID = findRxnIDs(model,rxnList)

DESCRIPTION ^

findRxnIDs Find reaction numbers in a model

 rxnID = findRxnIDs(model,rxnList)

INPUTS
 model     COBRA model strcture
 rxnList   List of reactions

OUTPUT
 rxnID     IDs for reactions corresponding to rxnList

 Markus Herrgard 4/21/06

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function rxnID = findRxnIDs(model,rxnList)
0002 %findRxnIDs Find reaction numbers in a model
0003 %
0004 % rxnID = findRxnIDs(model,rxnList)
0005 %
0006 %INPUTS
0007 % model     COBRA model strcture
0008 % rxnList   List of reactions
0009 %
0010 %OUTPUT
0011 % rxnID     IDs for reactions corresponding to rxnList
0012 %
0013 % Markus Herrgard 4/21/06
0014 
0015 if (iscell(rxnList))
0016     [tmp,rxnID] = ismember(rxnList,model.rxns);    
0017 else
0018     rxnID = find(strcmp(model.rxns,rxnList));
0019     if (isempty(rxnID))
0020         rxnID = 0;
0021     end
0022     if (length(rxnID) > 1)
0023         rxnID = rxnID(1);
0024     end
0025 end

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