findHiCarbonRxns

PURPOSE ^

findHiCarbonRxns returns the list of reactions that act of compounds which

SYNOPSIS ^

function [hiCarbonRxns,zeroCarbonRxns,nCarbon] = findHiCarbonRxns(model,nCarbonThr)

DESCRIPTION ^

findHiCarbonRxns returns the list of reactions that act of compounds which
contain cabons greater than the thershhold set.

 [hiCarbonRxns,nCarbon] = findHiCarbonRxns(model,nCarbonThr)

INPUTS
 model            Structure containing all necessary variables to described a
                  stoichiometric model
 nCarbonThr       defines the min # of carbons that a metabolite, that is
                  acted on in a reaction, can have in the final list of reactions

OUTPUTS
 hiCarbonRxns     The list of reactions that act on metabolites with
                  greater than the thershhold number of carbons
 nCarbon          The number of carbons in each metabolite in the model


 Markus Herrgard 2/7/07

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [hiCarbonRxns,zeroCarbonRxns,nCarbon] = findHiCarbonRxns(model,nCarbonThr)
0002 %findHiCarbonRxns returns the list of reactions that act of compounds which
0003 %contain cabons greater than the thershhold set.
0004 %
0005 % [hiCarbonRxns,nCarbon] = findHiCarbonRxns(model,nCarbonThr)
0006 %
0007 %INPUTS
0008 % model            Structure containing all necessary variables to described a
0009 %                  stoichiometric model
0010 % nCarbonThr       defines the min # of carbons that a metabolite, that is
0011 %                  acted on in a reaction, can have in the final list of reactions
0012 %
0013 %OUTPUTS
0014 % hiCarbonRxns     The list of reactions that act on metabolites with
0015 %                  greater than the thershhold number of carbons
0016 % nCarbon          The number of carbons in each metabolite in the model
0017 %
0018 %
0019 % Markus Herrgard 2/7/07
0020 
0021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0022 
0023 
0024 currencyMets = {'h2o','co2','o2','h2o2','nh4','no2','no3','no','h2s','so3','so4','h','h2','pi','ppi','coa','accoa','ppcoa','aacoa','butcoa','succoa','atp','gtp','adp','gdp','amp','gmp','nad','nadp','nadh','nadph','fad','fadh','na1','ahcys','amet','thf','mlthf'};
0025 
0026 [baseMetNames,compSymbols,uniqueMetNames,uniqueCompSymbols] = parseMetNames(model.mets);
0027 
0028 [carbons,tmp] = regexp(model.metFormulas,'^C(\d+)','tokens','match');
0029 
0030 nCarbon = [];
0031 for i = 1:length(carbons)
0032     if (~isempty(carbons{i}))
0033         nCarbon(i) = str2num(carbons{i}{1}{1});
0034     else
0035         nCarbon(i) = 0;
0036     end
0037 end
0038 
0039 nCarbon = columnVector(nCarbon);
0040 
0041 selectMets = (nCarbon >= nCarbonThr) & ~ismember(columnVector(baseMetNames),columnVector(currencyMets));
0042 
0043 selectRxns = any(model.S(selectMets,:) ~= 0);
0044 
0045 hiCarbonRxns = columnVector(model.rxns(selectRxns));
0046 
0047 selectMetsZero = (nCarbon == 0) & ~ismember(columnVector(baseMetNames),columnVector(currencyMets));
0048 
0049 selectRxnsZero = sum(model.S ~= 0 & repmat(selectMetsZero,1,size(model.S,2))) == sum(model.S ~= 0);
0050 
0051 zeroCarbonRxns = columnVector(model.rxns(selectRxnsZero));

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