Biorithm
1.1
|
This is an abstract algorithm for functional enrichment. More...
#include <enrichment-algorithm.h>
Public Member Functions | |
FunctionalEnrichmentAlgorithm (const set< MyNodeId > &clusterGenes, const set< MyNodeId > &universeGenes, MyAnnotations &annotations, const GeneOntology &go, string category) | |
Default constructor. | |
FunctionalEnrichmentAlgorithm (MyAnnotations &annotations, const GeneOntology &go, string category) | |
Constructor with only annotations. | |
virtual | ~FunctionalEnrichmentAlgorithm () |
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)=0 |
Computes whether one function is enriched. | |
virtual void | printEnrichmentResults (ostream &ostr)=0 |
prints the enrichment results for each function. | |
Protected Attributes | |
set< MyNodeId > | _clusterGenes |
The set of genes in the cluster of interest. | |
set< MyNodeId > | _universeGenes |
The set of genes in the universe that we are considering. | |
MyAnnotations & | _annotations |
The annotations for the genes in _universeGenes. | |
const GeneOntology * | _go |
An instance of the gene ontology. | |
string | _category |
The category of genes for which we want to compute enrichment. | |
Static Protected Attributes | |
static LogHelper | _logHelper = LogHelper() |
Helper For computing factorial logs. |
This is an abstract algorithm for functional enrichment.
This abstract base class simply serves as a skeleton to provide methods that different sub-classes must implement. Different sub-classes can have constructors with different signatures, depending on the arguments it needs. Note that this class and all subclasses assume that the cluster of interesting genes is a subset of the universe. This might not be checked and my lead to errors if the precondition doesn't hold.
FunctionalEnrichmentAlgorithm::FunctionalEnrichmentAlgorithm | ( | const set< MyNodeId > & | clusterGenes, |
const set< MyNodeId > & | universeGenes, | ||
MyAnnotations & | annotations, | ||
const GeneOntology & | go, | ||
string | category | ||
) |
Default constructor.
[in] | clusterGenes | A set of MyNodeIds that comprise the "cluster" we want to compute functional enrichment for. |
[in] | universeGenes | A set of MyNodeIds that comprise the "universe" we are considering. |
[in] | annotations | The set of functions and which genes they annotate. |
[in] | go | An instance of the Gene Ontology. |
[in] | category | The category of annotations on which to perform enrichment. |
FunctionalEnrichmentAlgorithm::FunctionalEnrichmentAlgorithm | ( | MyAnnotations & | annotations, |
const GeneOntology & | go, | ||
string | category | ||
) | [inline] |
Constructor with only annotations.
We use this so subclasses can pass in only annotations if they want.
[in] | annotations | The set of functions and which genes they annotate. |
[in] | go | An instance of the Gene Ontology. |
[in] | category | The category of annotations on which to perform enrichment. |
void FunctionalEnrichmentAlgorithm::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 in SetCoverEnrichment, FuncAssociate, EdgeGroupHyp, GroupHypAlgorithm, GenGOAlgorithm, RandomUniverseNetworkBasedEnrichmentAlgorithm, and RandomFunctionNetworkBasedEnrichmentAlgorithm.
virtual void FunctionalEnrichmentAlgorithm::computeEnrichmentForFunction | ( | const string | funcType, |
const string | funcId | ||
) | [pure virtual] |
Computes whether one function is enriched.
[in] | type | a string specifying the type of the function. |
[in] | functionId | a string specifying function. |
Implemented in SetCoverEnrichment, FuncAssociate, EdgeGroupHyp, GroupHypAlgorithm, GenGOAlgorithm, PAGEAlgorithm, HypergeometricAlgorithm, RandomUniverseNetworkBasedEnrichmentAlgorithm, and RandomFunctionNetworkBasedEnrichmentAlgorithm.
virtual void FunctionalEnrichmentAlgorithm::printEnrichmentResults | ( | ostream & | ostr | ) | [pure 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. |
Implemented in SetCoverEnrichment, FuncAssociate, EdgeGroupHyp, GroupHypAlgorithm, GenGOAlgorithm, PAGEAlgorithm, HypergeometricAlgorithm, RandomUniverseNetworkBasedEnrichmentAlgorithm, and RandomFunctionNetworkBasedEnrichmentAlgorithm.