findGenesFromRxns

PURPOSE ^

findGenesFromRxns make a gene list of the genes that correspond to the

SYNOPSIS ^

function [geneList]=findGenesFromRxns(model,reactions)

DESCRIPTION ^

findGenesFromRxns make a gene list of the genes that correspond to the 
selected reactions

 [geneList]=findGenesFromRxns(model,reactions)
 
INPUTS
 model         COBRA model structure
 reactions     Reactions to find the corresponding genes for

OUTPUT
 geneList      List of genes corresponding to reactions
 Markus Herrgard (7/3/06)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [geneList]=findGenesFromRxns(model,reactions)
0002 %findGenesFromRxns make a gene list of the genes that correspond to the
0003 %selected reactions
0004 %
0005 % [geneList]=findGenesFromRxns(model,reactions)
0006 %
0007 %INPUTS
0008 % model         COBRA model structure
0009 % reactions     Reactions to find the corresponding genes for
0010 %
0011 %OUTPUT
0012 % geneList      List of genes corresponding to reactions
0013 % Markus Herrgard (7/3/06)
0014 
0015 rxnInd = findRxnIDs(model, reactions);
0016 RxnNotInModel = find(rxnInd==0);
0017 if ~isempty(RxnNotInModel)
0018     for i = 1:length(RxnNotInModel)
0019         display(cat(2,'The reaction "', reactions{RxnNotInModel(i)},'" is not in your model!'));
0020         
0021     end
0022 end
0023 rxnInd(RxnNotInModel) = [];
0024 reactions(RxnNotInModel) = [];
0025 for i = 1:length(rxnInd)
0026     geneList{i} = model.genes(find(model.rxnGeneMat(rxnInd(i),:)));
0027 end
0028 
0029 geneList = columnVector(geneList);

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