Biorithm  1.1
Public Member Functions | Protected Attributes | Static Protected Attributes
FunctionalEnrichmentAlgorithm Class Reference

This is an abstract algorithm for functional enrichment. More...

#include <enrichment-algorithm.h>

Inheritance diagram for FunctionalEnrichmentAlgorithm:
EdgeGroupHyp FuncAssociate GenGOAlgorithm GroupHypAlgorithm HypergeometricAlgorithm PAGEAlgorithm RandomFunctionNetworkBasedEnrichmentAlgorithm RandomUniverseNetworkBasedEnrichmentAlgorithm SetCoverEnrichment

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

FunctionalEnrichmentAlgorithm::FunctionalEnrichmentAlgorithm ( const set< MyNodeId > &  clusterGenes,
const set< MyNodeId > &  universeGenes,
MyAnnotations annotations,
const GeneOntology go,
string  category 
)

Default constructor.

Parameters:
[in]clusterGenesA set of MyNodeIds that comprise the "cluster" we want to compute functional enrichment for.
[in]universeGenesA set of MyNodeIds that comprise the "universe" we are considering.
[in]annotationsThe set of functions and which genes they annotate.
[in]goAn instance of the Gene Ontology.
[in]categoryThe 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.

Parameters:
[in]annotationsThe set of functions and which genes they annotate.
[in]goAn instance of the Gene Ontology.
[in]categoryThe category of annotations on which to perform enrichment.

Member Function Documentation

void FunctionalEnrichmentAlgorithm::computeEnrichedFunctions ( const set< string > &  functionsToProcess) [virtual]

Computes the enrichment of all the functions.

Parameters:
[in]functionstoProcess,aset 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.

Parameters:
[in]typea string specifying the type of the function.
[in]functionIda 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.

Parameters:
[in]ostr,anoutput 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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends