Biorithm
1.1
|
The ActiveNetwork class stores a single ActiveNetwork. The class is a subclass of MyGraph. The class stores the experimental conditions associated with an ActiveNetwork, the set of biological functions enriched in the nodes of the ActiveNetwork. More...
#include <active-networks.h>
Public Member Functions | |
ActiveNetwork (const MyGraph &graph) | |
ActiveNetwork (const Itemset &itemset, unsigned int index) | |
void | addCondition (string cond) |
void | getConditions (vector< string > &conds) const |
unsigned int | numConditions () const |
void | setPvalue (MyNT val) |
MyNT | getPvalue () const |
void | clearEdgeEnrichments () |
Erase all computed information about edge enrichments. This method is useful when I want to try different enrichment algorithms in the same run. | |
void | computeEdgeEnrichments (const MyAnnotations &annotations) |
void | computeEdgeEnrichments (map< string, Enrichment< string, string > > &annotations) |
void | clearNodeEnrichments () |
Erase all computed information about node enrichments. This method is useful when I want to try different enrichment algorithms in the same run. | |
void | computeNodeEnrichments (map< string, Enrichment< string, string > > &annotations) |
Compute the functions enriched in the nodes in the ActiveNetwork. Use ActiveNetwork::printNodeEnrichments() to print the enriched functions after invoking this method. | |
void | computeNodeWeights (const GEData &gedata) |
void | printConditions (ostream &ostr) const |
Layout the ActiveNetwork but only for the genes annotated with the function nodeAnnotationToLayout. | |
void | printEdgesItemset (ostream &itemsetStream, string id) |
void | printEdgeEnrichments (ostream &fstr) |
void | printEdgeEnrichedFunctions (ostream &ostr) |
Print the enriched functions annotating each edge. | |
void | printNodeEnrichments (ostream &fstr, const GeneOntology *goDag=NULL) |
void | printItemset (ostream &ostr) const |
void | printNodeEnrichedFunctions (ostream &ostr) |
Print the enriched functions annotating each node. | |
void | printStatistics (ostream &ostr) |
Print statistics on the ActiveNetwork. | |
void | printStatisticsComponents (ostream &ostr) |
Print statistics on the connected components in the ActiveNetwork. | |
void | expand (const GEData &expression, MyNT correlationThreshold, bool trivialExpand=true) |
Expand the invocant using edges based soley on gene expression weights. | |
void | expand (ActiveNetwork &expanded, const GEData &expression, MyNT correlationThreshold) |
void | read (string anetString) |
void | setEnrichedFunctionsByEdge (map< string, vector< string > > &efeMap) |
Set the map from each edge to the enriched functions annotating the edge. | |
void | setPerNodeEnrichedFunctions (map< MyNodeId, vector< string > > &efnMap) |
Set the map from each node to the enriched functions annotating the node. | |
void | setNodeEnrichedFunctions (vector< EnrichmentRecord< string, string > > &efMap) |
Set the functions (annotating nodes) enriched in this active network from the efMap. | |
void | updateNodeEnrichmentsMap (map< string, map< string, MyNT > > &functionsToANs, const GeneOntology *goDag=NULL) |
The ActiveNetwork class stores a single ActiveNetwork. The class is a subclass of MyGraph. The class stores the experimental conditions associated with an ActiveNetwork, the set of biological functions enriched in the nodes of the ActiveNetwork.
void ActiveNetwork::computeEdgeEnrichments | ( | const MyAnnotations & | annotations | ) |
Compute the functions enriched in the edges of the ActiveNetwork. Use ActiveNetwork::printEdgeEnrichments() to print the enriched functions after invoking this method.
[in] | annotations | The set of functional annotations. |
void ActiveNetwork::computeEdgeEnrichments | ( | map< string, Enrichment< string, string > > & | annotations | ) |
Compute the functions enriched in the edges in the ActiveNetwork. Use ActiveNetwork::printEdgeEnrichments() to print the enriched functions after invoking this method.
[in] | annotations | The set of functional annotations. This parameter is a map from function category to an instance of Enrichment. |
void ActiveNetwork::computeNodeEnrichments | ( | map< string, Enrichment< string, string > > & | annotations | ) |
Compute the functions enriched in the nodes in the ActiveNetwork. Use ActiveNetwork::printNodeEnrichments() to print the enriched functions after invoking this method.
[in] | annotations,the | set of functional annotations. This parameter is a map from function category to an instance of Enrichment. |
void ActiveNetwork::computeNodeWeights | ( | const GEData & | gedata | ) |
Compute the weight of each node in the ActiveNetwork.
[in] | geData | A reference to a gene expression dataset. |
The weight of a node is the average expression value of the gene corresponding to the node in gedata. The method also computes the total and average weights of the nodes in the invocant.
void ActiveNetwork::expand | ( | const GEData & | expression, |
MyNT | correlationThreshold, | ||
bool | trivialExpand = true |
||
) |
Expand the invocant using edges based soley on gene expression weights.
Add genes in expression that are highly correlated to the genes in the ActiveNetwork. The new genes are those that do not have any interactions in the underlying wiring diagram and those that may be only indirectly connected in the wiring diagram to the genes in the ActiveNetwork. For each gene not in the ActiveNetwork, the method computes the absolute value of the correlations to all the genes in the ActiveNetwork, and computes the sum of all these values. It adds the gene with the smallest sum to the ActiveNetwork, where this sum is at least the value of the density of the ActiveNetwork. Adding such a gene guarantees that the density of the ActiveNetwork does not decrease. The method continues adding genes until adding any remaining gene will decrease the density of the ActiveNetwork.
[in] | expression,one | of the gene expression data sets that correspond to the experimental conditions that created this ActiveNetwork. |
[in] | trivialExpand,a | boolean. If this variable is true, expand based only on gene-expression-based interactions connecting a new gene to a gene in the original ActiveNetwork. If this variable is false, connect a new gene to other newly-added genes. |
void ActiveNetwork::expand | ( | ActiveNetwork & | expanded, |
const GEData & | expression, | ||
MyNT | correlationThreshold | ||
) | [inline] |
The method performs the same action as ActiveNetwork::expand, except that it returns the expanded network in expanded.
[out] | expanded,an | instance of ActiveNetwork. |
[in] | expression,an | instance of GEData. |
void ActiveNetwork::printConditions | ( | ostream & | ostr | ) | const |
Layout the ActiveNetwork but only for the genes annotated with the function nodeAnnotationToLayout.
The method will layout only the subgraph of the invocant that is induced by genes annotated with the function nodeAnnotationToLayout. If superGraph is not NULL, then the method will include genes in the superGraph that are annotated with this function but are not nodes in the invocant; the method will mark these nodes differently.
The parameters nodeAnnotationToLayout, nodeAliases, nodeUrl, superGraph serve the same role as in ActiveNetwork::layout().
[in] | annotations,an | instance of MyAnnotations containing functions annotating all the genes. |
[in] | nodeAnnotationToLayout,the | id of the function for which to layout the ActiveNetwork. |
[in] | otherActiveNetworks,a | pointer to a set of pointer to ActiveNetwork. If this pointer is not NULL, the method will extract from each ActiveNetwork, the subgraph induced by the genes annotated with nodeAnnotationToLayout. The method will also colour each gene (node) in the layout based on which ActiveNetworks (including the invocant) the gene is a member of. |
[in] | geDataSets,a | pointer to a SetOfPointSets. If this pointer is not NULL, the method will add colours to each node corresponding to the expression values of that node in the gene expression data. If otherActiveNetworks is not NULL, each node will also contain colours for each network in otherActiveNetworks that the node is present in. In both cases, geDataSets must contain individual one gene expression dataset for each ActiveNetwork (either the invocant or in otherActiveNetworks). |
[in] | efDict,a | pointer to a google::TemplateDictionary, which the method will fill in with names of variables in single-enriched-function.pl. |
void ActiveNetwork::printEdgeEnrichedFunctions | ( | ostream & | ostr | ) |
Print the enriched functions annotating each edge.
[out] | ostr,an | output stream to print to. |
For each edge in the invocant, this method prints all the functions enriched in the invocant that annotate the edge. The method prints each edge-function pair on a separate line.
void ActiveNetwork::printEdgeEnrichments | ( | ostream & | fstr | ) |
Print the functions enriched in the edges in the ActiveNetwork.
[out] | ostream | A stream to print the enrichment information to. |
void ActiveNetwork::printEdgesItemset | ( | ostream & | itemsetStream, |
string | id | ||
) |
Print the edges and conditions in the ActiveNetwork in "itemset" format.
void ActiveNetwork::printItemset | ( | ostream & | ostr | ) | const |
Print the interactions and conditions in the module in "itemset" format.
void ActiveNetwork::printNodeEnrichedFunctions | ( | ostream & | ostr | ) |
Print the enriched functions annotating each node.
[out] | ostr,an | output stream to print to. |
For each node in the invocant, this method prints all the functions enriched in the invocant that annotate the node. The method prints each node-function pair on a separate line.
void ActiveNetwork::printNodeEnrichments | ( | ostream & | fstr, |
const GeneOntology * | goDag = NULL |
||
) |
Print the functions enriched in the nodes in the ActiveNetwork.
[in] | annotations,the | set of functional annotations. |
[out] | ostream,a | stream to print the enrichment information to. |
[in] | goDag,a | pointer to an instance of GeneOntology, storing the structure of the Gene Ontology. |
void ActiveNetwork::printStatistics | ( | ostream & | ostr | ) |
Print statistics on the ActiveNetwork.
[out] | ostr,an | output stream to print to. |
The method prints the following statistics on the ActiveNetwork:
void ActiveNetwork::printStatisticsComponents | ( | ostream & | ostr | ) |
Print statistics on the connected components in the ActiveNetwork.
[out] | ostr,an | output stream to print to. |
The method prints the following statistics on the ActiveNetwork:
void ActiveNetwork::read | ( | string | anetString | ) |
Read the ActiveNetwork from a description in a string.
[in] | anetString,the | string describing the ActiveNetwork. |
Reads an ActiveNetwork from a string. The string contains multiple substrings separated by tabs. The substrings are in order:
(i) A string containing the name of the ActiveNetwork, the number of edges in the ActiveNetwork, and the number of conditions in the ActiveNetwork, all separated by underscores,
(ii) the edges of the ActiveNetwork; each edge is a string made up of the first node, the edge type, and the second node, all separated by underscores, and
(iii) the conditions in the ActiveNetwork.
void ActiveNetwork::setPvalue | ( | MyNT | val | ) | [inline] |
Set the pvalue of the ActiveNetwork.
void ActiveNetwork::updateNodeEnrichmentsMap | ( | map< string, map< string, MyNT > > & | functionsToANs, |
const GeneOntology * | goDag = NULL |
||
) |
Add enriched functions annotating nodes and the p-values to the input map.
[in] | functionsToANs,a | two dimensional map first keyed by function id and then by active network id , and storing the p-value of an enriched function in an active network. |