Package CHEM :: Package Annotation :: Module AnnotationSummarizer :: Class AnnotationSummarizer
[hide private]
[frames] | no frames]

Class AnnotationSummarizer



Summarize annotation statistics. Collects the summary statistics for the table and column and write it to the outFile. If no correlate column is provided, will just get a count histogram. If the correlate column IS specified, then will do a correlation analysis by the finding the mean and standard deviation of the correlate column's value for each "bin" of the primary column.

If specify a list of columns with respective multiple minValue, maxValue, increment and scalar, then will find an n-dimensional histogram, 1 dimension for each column.

Instance Methods [hide private]
 
__init__(self, table, columns, minValues, maxValues, increments, scalars=None, correlate=None)
Constructor
 
run(self, outFile)
Primary execution method
 
buildParamSets(self)
In the simplest case, when the histogram or correlation is only in 1 dimension, effectively just returns a list of 2-ples, containing the histogram bin min from this sequence from range(minValue,maxValue,increment) and the bin max from the same sequence, but each with an added "increment."
 
extendParamSets(self, paramSets, currentParamSet)
Recursive function to build the parameter sets.
Method Details [hide private]

buildParamSets(self)

 

In the simplest case, when the histogram or correlation is only in 1 dimension, effectively just returns a list of 2-ples, containing the histogram bin min from this sequence from range(minValue,maxValue,increment) and the bin max from the same sequence, but each with an added "increment."

However, for multi-dimensional histograms, have to expand out the list, multiplying by the range for each extra dimension. For d-dimensions, should return a list of parameter tuples, each 2*d items long.

extendParamSets(self, paramSets, currentParamSet)

 

Recursive function to build the parameter sets.

paramSets - List to extend in the base case with another parameter set tuple. currentParamSet - The parameter set tuple built so far. Will grow with successive recursions until reach base case of all histogram dimensions accounted for, and a tuple is added to the paramSets.