analyzeRxns

PURPOSE ^

analyzeRxns determines which knockout reactions occur most often

SYNOPSIS ^

function [allRxns,rxnCount] = analyzeRxns(product,listProducts,listRxns)

DESCRIPTION ^

analyzeRxns       determines which knockout reactions occur most often 
                  when a specified product is produced

 [allRxns, rxnCount] = analyzeRxns(product,listProducts,listRxns)

INPUTS
 product          the product to investigate
 listProducts     the list of all products produced in a RandKnock
 listRxns         the list of all rxns knocked out in a RandKnock

OUTPUTS
 allRxns          all of the rxns knocked out in strains producing the
                  product
 rxnCount         the number of times each rxn was knocked out

 Jeff Orth (6/20/07)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [allRxns,rxnCount] = analyzeRxns(product,listProducts,listRxns) 
0002 %analyzeRxns       determines which knockout reactions occur most often
0003 %                  when a specified product is produced
0004 %
0005 % [allRxns, rxnCount] = analyzeRxns(product,listProducts,listRxns)
0006 %
0007 %INPUTS
0008 % product          the product to investigate
0009 % listProducts     the list of all products produced in a RandKnock
0010 % listRxns         the list of all rxns knocked out in a RandKnock
0011 %
0012 %OUTPUTS
0013 % allRxns          all of the rxns knocked out in strains producing the
0014 %                  product
0015 % rxnCount         the number of times each rxn was knocked out
0016 %
0017 % Jeff Orth (6/20/07)
0018 
0019 %find all product producers
0020 makesProd = [];
0021 h = waitbar(0,['finding ',product,' producing strains']);
0022 for i = 1:length(listProducts)
0023     waitbar(i/length(listProducts),h);
0024     pos = strmatch(product,listProducts{i});
0025     if pos ~= 0
0026         makesProd = [makesProd,i];
0027     end
0028 end
0029 if ( regexp( version, 'R20') )
0030         close(h);
0031 end
0032 
0033 %determine which reactions are knocked out in each strain, return the
0034 %frequency of each knockout reactions
0035 allRxns = [];
0036 rxnCount = [];
0037 for i = 1:length(makesProd)
0038     rxns = listRxns(makesProd(i));
0039     rxns = rxns{1};
0040     for j = 1:length(rxns)
0041         rxn = rxns(j);
0042         %if reaction has not been added to list yet, add it
0043         match = strcmp(rxn,allRxns);
0044         if length(find(match)) == 0
0045             allRxns = [allRxns,rxn];
0046             rxnCount = [rxnCount,1];
0047         else
0048             rxnCount(find(match)) = rxnCount(find(match))+1;
0049         end
0050     end
0051 end
0052 
0053 
0054

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