Biorithm
1.1
|
This class implements the set-based hypergeometric algorithm for computing functional enrichment. More...
#include <enrichment-algorithm.h>
Classes | |
struct | hypergeometricEnrichmentResult |
This structure stores various enrichment results calculated during functional enrichment. Any p-values that are computed will be stored in this structure along with their associated function. More... | |
Public Member Functions | |
HypergeometricAlgorithm (const set< string > &clusterGraph, const set< string > &universeSet, MyAnnotations &annotations, const GeneOntology &go, string category) | |
Constructor. | |
HypergeometricAlgorithm (const MyGraph &clusterGraph, const MyGraph &universeGraph, MyAnnotations &annotations, const GeneOntology &go, string category) | |
Constructor. | |
virtual | ~HypergeometricAlgorithm () |
Default destructor. | |
virtual void | computeEnrichmentForFunction (const string funcType, const string funcId) |
Determines the sizes of the 4 sets needed to calculate the hyergeometric p-value: universe size, cluster size, function size, cluster-and-function size. | |
virtual void | printEnrichmentResults (ostream &ostr) |
prints the enrichment results for each function. | |
Static Public Member Functions | |
static long double | getHypergeometricPvalue (int v, int c, int v_f, int c_f) |
calculates Fisher's one-sided exact test for the given values. This sums the following over all values of k, where c_f <= k <= min(v_f, c): choose(c,k)*choose(v-c,v_f-k)/choose(v, v_f) |
This class implements the set-based hypergeometric algorithm for computing functional enrichment.
HypergeometricAlgorithm::HypergeometricAlgorithm | ( | const set< string > & | clusterGraph, |
const set< string > & | universeSet, | ||
MyAnnotations & | annotations, | ||
const GeneOntology & | go, | ||
string | category | ||
) |
Constructor.
[in] | clusterSet | is a set of strings storing the "cluster" for which we want to compute functional enrichment. |
[in] | universeSet | a set of strings storing the universe of genes. |
[in] | annotations | The annotations for the genes. |
HypergeometricAlgorithm::HypergeometricAlgorithm | ( | const MyGraph & | clusterGraph, |
const MyGraph & | universeGraph, | ||
MyAnnotations & | annotations, | ||
const GeneOntology & | go, | ||
string | category | ||
) |
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 HypergeometricAlgorithm::computeEnrichmentForFunction | ( | const string | funcType, |
const string | funcId | ||
) | [virtual] |
Determines the sizes of the 4 sets needed to calculate the hyergeometric p-value: universe size, cluster size, function size, cluster-and-function size.
[in] |
Implements FunctionalEnrichmentAlgorithm.
long double HypergeometricAlgorithm::getHypergeometricPvalue | ( | int | v, |
int | c, | ||
int | v_f, | ||
int | c_f | ||
) | [static] |
calculates Fisher's one-sided exact test for the given values. This sums the following over all values of k, where c_f <= k <= min(v_f, c): choose(c,k)*choose(v-c,v_f-k)/choose(v, v_f)
[in] | v,the | size of the universe set V |
[in] | c,the | size of the "cluster" set C |
[in] | v_f,the | size of the set of elements in V annotated with function f. |
[in] | c_f,the | size of the set of elements in C annotated with function f. |
void HypergeometricAlgorithm::printEnrichmentResults | ( | ostream & | ostr | ) | [virtual] |
prints the enrichment results for each function.
[in] | ostr,an | output stream to which the results will be written. Use cout for printing to a terminal. |
Implements FunctionalEnrichmentAlgorithm.