findCarbonRxns

PURPOSE ^

findHiCarbonRxns returns the list of reactions that act of compounds which

SYNOPSIS ^

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

DESCRIPTION ^

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

 [hiCarbonRxns,zeroCarbonRxns,nCarbon] = findCarbonRxns(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

 Modified to detect Mets with 1 Carbon. Richard Que (11/16/09)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [hiCarbonRxns,zeroCarbonRxns,nCarbon] = findCarbonRxns(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,zeroCarbonRxns,nCarbon] = findCarbonRxns(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 % Modified to detect Mets with 1 Carbon. Richard Que (11/16/09)
0022 
0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0024 
0025 % currency metabolitees not to be considered
0026 currencyMets = {'h2o','co2','o2','h2o2','nh4','no2','no3','no','h2s',...
0027     'so3','so4','h','h2','pi','ppi','coa','accoa','ppcoa','aacoa',...
0028     'butcoa','succoa','atp','gtp','adp','gdp','amp','gmp','nad',...
0029     'nadp','nadh','nadph','fad','fadh','na1','ahcys','amet','thf','mlthf',...
0030     'q8h2','q8','mql8','mqn8','2dmmql8','2dmmq8'};
0031 % not sure if L-glutamate, L-glutamine should be included in this list
0032 
0033 [baseMetNames,compSymbols,uniqueMetNames,uniqueCompSymbols] = parseMetNames(model.mets);
0034 
0035 %[carbons,tmp] = regexp(model.metFormulas,'^C(\d+)','tokens','match');
0036 %changed ^C(\d+) to C(\d*) to detect mets with 1 C and that do not start with C. R. Que (11/16/09)
0037 [carbons,tmp] = regexp(model.metFormulas,'C(\d*)','tokens','match'); 
0038 
0039 nCarbon = [];
0040 for i = 1:length(carbons)
0041     if (~isempty(carbons{i}))
0042         if (~isempty(carbons{i}{1}{1}))  %to compensate for mets no numeric after C
0043             nCarbon(i) = str2num(carbons{i}{1}{1});
0044         else
0045             nCarbon(i) = 1;
0046         end
0047     else
0048         nCarbon(i) = 0;
0049     end
0050 end
0051 
0052 nCarbon = columnVector(nCarbon);
0053 
0054 selectMets = (nCarbon >= nCarbonThr) & ~ismember(columnVector(baseMetNames),columnVector(currencyMets));
0055 
0056 selectRxns = any(model.S(selectMets,:) ~= 0);
0057 
0058 hiCarbonRxns = columnVector(model.rxns(selectRxns));
0059 
0060 %selectMetsZero = (nCarbon == 0) & ~ismember(columnVector(baseMetNames),columnVector(currencyMets));
0061 selectMetsZero = (nCarbon == 0); % not going to exclude the currency metabolites in this case
0062 
0063 selectRxnsZero = sum(model.S ~= 0 & repmat(selectMetsZero,1,size(model.S,2))) == sum(model.S ~= 0);
0064 
0065 zeroCarbonRxns = columnVector(model.rxns(selectRxnsZero));

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