Biorithm
1.1
|
This class implements an enrichment method similar to the GenGO method (see http://www.ncbi.nlm.nih.gov/pubmed/18676451). However, instead of maximizing the log-likelihood function discussed in the GenGO paper, GroupHypAlgorithm minimizes the hypergeometric p-value for a given set of functions. Initially, all functions are inactive. We try all possible one-function changes (i.e., remove or add a single function) to the current set of active functions. By treating the collection of active functions as a single function, we can see if the addition or removal of any function causes the group p-value to decrease. If so, we add or remove that function and repeat. More...
#include <enrichment-algorithm.h>
Public Member Functions | |
GroupHypAlgorithm (const MyGraph &clusterGraph, const MyGraph &universeGraph, MyAnnotations &annotations, const GeneOntology &go, string category) | |
Default constructor. | |
virtual | ~GroupHypAlgorithm () |
Default destructor. | |
virtual void | computeEnrichedFunctions (const set< string > &functionsToProcess) |
Computes the enrichment of all the functions. | |
virtual void | computeEnrichmentForFunction (const string funcType, const string funcId) |
Computes whether one function is enriched. | |
virtual void | printEnrichmentResults (ostream &ostr) |
prints the enrichment results |
This class implements an enrichment method similar to the GenGO method (see http://www.ncbi.nlm.nih.gov/pubmed/18676451). However, instead of maximizing the log-likelihood function discussed in the GenGO paper, GroupHypAlgorithm minimizes the hypergeometric p-value for a given set of functions. Initially, all functions are inactive. We try all possible one-function changes (i.e., remove or add a single function) to the current set of active functions. By treating the collection of active functions as a single function, we can see if the addition or removal of any function causes the group p-value to decrease. If so, we add or remove that function and repeat.
GroupHypAlgorithm::GroupHypAlgorithm | ( | const MyGraph & | clusterGraph, |
const MyGraph & | universeGraph, | ||
MyAnnotations & | annotations, | ||
const GeneOntology & | go, | ||
string | category | ||
) |
Default constructor.
[in] | clusterGraph | an instance of MyGraph storing the "cluster" for which we want to compute functional enrichment. |
[in] | universeGraph | an instance of MyGraph storing the universe of genes. |
[in] | annotations | The annotations for the genes. |
void GroupHypAlgorithm::computeEnrichedFunctions | ( | const set< string > & | functionsToProcess | ) | [virtual] |
Computes the enrichment of all the functions.
[in] | functionstoProcess,a | set of strings, where each string represents a function ID. If the set is nonempty, functional enrichment will only be performed for the listed functions in this set. |
Reimplemented from FunctionalEnrichmentAlgorithm.
virtual void GroupHypAlgorithm::computeEnrichmentForFunction | ( | const string | funcType, |
const string | funcId | ||
) | [inline, virtual] |
Computes whether one function is enriched.
[in] | type | a string specifying the type of the function. |
[in] | functionId | a string specifying function. |
Implements FunctionalEnrichmentAlgorithm.
void GroupHypAlgorithm::printEnrichmentResults | ( | ostream & | ostr | ) | [virtual] |
prints the enrichment results
[in] | ostr,an | output stream to which the results will be written. Use cout for printing to a terminal. |
Implements FunctionalEnrichmentAlgorithm.