Biorithm
1.1
|
The SetOfActiveNetworks class stores a set of ActiveNetworks, all of which share some property. More...
#include <active-networks.h>
Public Member Functions | |
void | add (ActiveNetwork &anet) |
void | add (vector< ActiveNetwork > &nets) |
void | add (Itemset &itemset, unsigned int index) |
void | add (vector< Itemset > &itemsets) |
void | addCondition (string condition) |
virtual void | compareNetworkLegosToActiveNetworks () |
void | computeBinaryMatrix (vector< vector< unsigned int > > &binaryMatrix, map< unsigned int, string > &rowNames, map< unsigned int, string > &columnNames, bool addComplements=false, set< unsigned int > *complementRows=NULL) |
Compute a binary matrix representing memberships of interactions in ActiveNetworks. | |
void | computeEdgeBetweenessCentrality () |
void | clearEdgeEnrichments () |
Erase all computed information about edge enrichments in each active network. This method is useful when I want to try different enrichment algorithms in the same run. | |
void | computeEdgeEnrichments (const MyAnnotations &annotations) |
void | computeEdgeSimilarityGraph (MyGraph &graph) const |
void | clearNodeEnrichments () |
Erase all computed information about node enrichments in each active network. This method is useful when I want to try different enrichment algorithms in the same run. | |
void | computeNodeWeights (const GEData &gedata) |
MyNT | computeMostSimilarEdges (const MyGraph &other, unsigned int &bestIndex) const |
MyNT | computeMostSimilarNodes (const MyGraph &other, unsigned int &bestIndex) const |
void | computeNodeBetweenessCentrality () |
void | computeNodeCounts () |
void | computeNodeSimilarityGraph (MyGraph &graph) const |
void | computePvalues (const MyHistogram &histogram) |
void | computeSNetwork () |
Compute the "s"Network formed by the ActiveNetworks. | |
void | computeUnion (string name, ActiveNetwork &unionActiveNetwork) |
void | computeUnion (string name) |
void | expand (const GEData &expression, string id, MyNT correlationThreshold) |
vector< ActiveNetwork > | getActiveNetworks () |
void | getUnion (ActiveNetwork &unionActiveNetwork) |
unsigned int | getNumActiveNetworks () const |
Return the number of ActiveNetworks stored. | |
void | printConditions (ostream &conditionStream) |
void | printEdges (ostream &edgeStream) |
void | printEdgeBetweenessCentrality (ostream &edgeCentralityStream) |
void | printEdgesItemset (ostream &itemsetStream, string id) |
void | printEdgeTypeCounts (ostream &edgeTypesCountStream) |
void | printEdgeEnrichments (ostream &edgeEnrichmentStream, ostream &edgeEnrichedFunctionStream) |
void | printEdgeWeightsHistograms (ostream &edgeWeightsHistogramStream, string fileName) |
void | printNodeEnrichments (ostream &nodeEnrichmentStream, ostream &nodeEnrichedFunctionStream, GeneOntology *go) |
Print tabular information on enriched functions annotating nodes in the active networks. | |
void | processNodeEnrichments (ostream &processNodeEnrichmentsStream, const GeneOntology *go) |
Analyse patterns in the enriched functions annotating nodes in the active networks. | |
void | printNodes (ostream &nodeStream) |
void | printNodeBetweenessCentrality (ostream &nodeCentralityStream) |
void | printNodeWeightsHistograms (ostream &nodeWeightsHistogramStream, string fileName) |
void | printStatistics (ostream &statStream) |
void | read (const vector< string > &activeNetworkFiles) |
void | read (string activeNetworkFile) |
void | readEdges (string edgesFile) |
virtual void | readMappingFromNetworkLegosToActiveNetworks (string nlsToRNsFile) |
This function is defined in SetOfActiveNetworks only because of an implementation detail in NetMan::processComputedActiveNetworks(). Ideally, this method should be defined only in SetOfNetworkLegos. | |
void | readNodeEnrichedFunctions (string nodeEnrichedFunctionsFile) |
void | readNodeEnrichments (string nodeEnrichmentsFile) |
void | readNodes (string nodesFile, MyGraph &superGraph) |
Protected Attributes | |
vector< ActiveNetwork > | _anets |
map< string, unsigned int > | _anetIdToIndex |
ActiveNetwork | _combinedAnet |
map< MyEdge, MyNT > | _edgeCentralities |
map< MyNodeId, MyNT > | _nodeCentralities |
map< MyNodeId, vector< MyGraph * > > | _nodeCounts |
Friends | |
class | SetOfNetworkLegos |
The SetOfActiveNetworks class stores a set of ActiveNetworks, all of which share some property.
void SetOfActiveNetworks::add | ( | ActiveNetwork & | anet | ) | [inline] |
Add an ActiveNetwork.
void SetOfActiveNetworks::add | ( | vector< ActiveNetwork > & | nets | ) | [inline] |
Add multiple ActiveNetworks.
void SetOfActiveNetworks::add | ( | Itemset & | itemset, |
unsigned int | index | ||
) | [inline] |
Add an ActiveNetwork stored as an Itemset.
[in] | itemset,a | reference to the Itemset to be added. |
[in] | index,the | index of the ActiveNetwork, set/incremented by the caller. |
void SetOfActiveNetworks::add | ( | vector< Itemset > & | itemsets | ) | [inline] |
Add multiple ActiveNetworks stored as Itemsets.
void SetOfActiveNetworks::addCondition | ( | string | condition | ) | [inline] |
Add condition to all the ActiveNetworks.
virtual void SetOfActiveNetworks::compareNetworkLegosToActiveNetworks | ( | ) | [inline, virtual] |
This function is defined in SetOfActiveNetworks only because of an implementation detail in NetMan::processComputedActiveNetworks(). Ideally, this method should be defined only in SetOfNetworkLegos.
Reimplemented in SetOfNetworkLegos.
void SetOfActiveNetworks::computeBinaryMatrix | ( | vector< vector< unsigned int > > & | binaryMatrix, |
map< unsigned int, string > & | rowNames, | ||
map< unsigned int, string > & | columnNames, | ||
bool | addComplements = false , |
||
set< unsigned int > * | complementRows = NULL |
||
) |
Compute a binary matrix representing memberships of interactions in ActiveNetworks.
[out] | binaryMatrix,a | two-dimensional vector of unsigned ints. Each row represents an ActiveNetwork and each column represents an interaction in an ActiveNetwork. |
[out] | rowNames,a | map from the name of an ActiveNetwork to the row it corresponds to in binaryMatrix. |
[out] | columnNames,a | map from a string representing an interaction to the column it corresponds to in binaryMatrix. |
[in] | addComplements,a | boolean. If this variable is true, the method adds the complement of each ActiveNetwork's binary vector to binaryMatrix. The name of the corresponding row is the name of the ActiveNetwork prefixed by "complement-". |
[out] | complementRows,a | pointer to a set of unsigned ints. If addComplements is true and this variable is not NULL, the method adds the indices of the rows corresponding to the ActiveNetwork complements to this set. |
For each interaction (edge) in the union of all ActiveNetworks, compute its betweenness centrality and store them internally.
void SetOfActiveNetworks::computeEdgeEnrichments | ( | const MyAnnotations & | annotations | ) |
Compute the functions enriched in the edges of each ActiveNetwork.
[in] | annotations,functional | annotations for all the edges in the ActiveNetwork. |
The method uses the set of all edges with functional annotations in the argument as the universal set.
void SetOfActiveNetworks::computeEdgeSimilarityGraph | ( | MyGraph & | graph | ) | const |
Compute a graph representing the similarity of the edge sets of the ActiveNetworks.
The method constructs a graph where each node is an active network and the weight of each edge is the set similarity of the edge sets of the two active networks connected by the edge.
MyNT SetOfActiveNetworks::computeMostSimilarEdges | ( | const MyGraph & | other, |
unsigned int & | bestIndex | ||
) | const |
Compute the ActiveNetwork most similar to other based on common edges.
[in] | other,an | instance of MyGraph. |
[out] | bestIndex,the | index in the invocant of the most similar ActiveNetwork. |
MyNT SetOfActiveNetworks::computeMostSimilarNodes | ( | const MyGraph & | other, |
unsigned int & | bestIndex | ||
) | const |
Compute the ActiveNetwork most similar to other based on common nodes.
[in] | other,an | instance of MyGraph. |
[out] | bestIndex,the | index in the invocant of the most similar ActiveNetwork. |
Compute NetworkLegos based on the ActiveNetworks in the invocant. For each node in the union of all ActiveNetworks, compute its betweenness centrality and store them internally.
For each node, compute how many ActiveNetworks it appears in.
void SetOfActiveNetworks::computeNodeSimilarityGraph | ( | MyGraph & | graph | ) | const |
Compute a graph representing the similarity of the node sets of the ActiveNetworks.
The method constructs a graph where each node is an active network and the weight of each edge is the set similarity of the node sets of the two active networks connected by the edge.
void SetOfActiveNetworks::computeNodeWeights | ( | const GEData & | gedata | ) |
Compute node weights in each ActiveNetwork.
[in] | geData,a | reference to a gene expression dataset. |
void SetOfActiveNetworks::computePvalues | ( | const MyHistogram & | histogram | ) |
Compute p-values of ActiveNetworks from a histogram of densities in random networks.
[in] | histogram,a | histogram of densities in ActiveNetworks computed in random networks. |
void SetOfActiveNetworks::computeSNetwork | ( | ) |
Compute the "s"Network formed by the ActiveNetworks.
An "s"Network ("s" stands for "state", "stimulus", "stress", or what have you) is a network where nodes are ActiveNetworks and edges represent similarities between ActiveNetworks. This method constructs the minimum spanning tree of the complete graph connecting all ActiveNetworks.
void SetOfActiveNetworks::computeUnion | ( | string | name, |
ActiveNetwork & | unionActiveNetwork | ||
) | [inline] |
Compute the union of all ActiveNetworks.
[in] | name,a | string from which to form the name of the union. |
[out] | unionActiveNetwork, an instance of ActiveNetwork that will contain the union. |
void SetOfActiveNetworks::computeUnion | ( | string | name | ) |
Compute the union of all ActiveNetworks and store it internally.
[in] | name,a | string from which to form the name of the union. |
void SetOfActiveNetworks::expand | ( | const GEData & | expression, |
string | id, | ||
MyNT | correlationThreshold | ||
) |
Expand computed ActiveNetworks using edges with high correlation that are not in the wiring diagram.
vector< ActiveNetwork > SetOfActiveNetworks::getActiveNetworks | ( | ) | [inline] |
Return the ActiveNetworks.
[out] | _anets, a vector containing all the ActiveNetworks in the set. |
void SetOfActiveNetworks::getUnion | ( | ActiveNetwork & | unionActiveNetwork | ) | [inline] |
Return the union of all ActiveNetworks.
[out] | unionActiveNetwork, an instance of ActiveNetwork that will contain the union. |
The method assumes that you have already invoked one of the versions of SetOfActiveNetworks::computeUnion().
void SetOfActiveNetworks::printEdgeWeightsHistograms | ( | ostream & | edgeWeightsHistogramStream, |
string | fileName | ||
) |
Print edge weight histograms to a file and run gnuplot on this file.
edgeWeightsHistogramStream,an | output stream to print the histograms to. This stream must be a file stream. |
fileName,the | name of the file that the first parameter points to. |
void SetOfActiveNetworks::printNodeWeightsHistograms | ( | ostream & | nodeWeightsHistogramStream, |
string | fileName | ||
) |
Print node weight histograms to a file and run gnuplot on this file.
nodeWeightsHistogramStream,an | output stream to print the histograms to. This stream must be a file stream. |
fileName,the | name of the file that the first parameter points to. |
void SetOfActiveNetworks::read | ( | const vector< string > & | activeNetworkFiles | ) |
Read ActiveNetworks from a list of files.
[in] | activeNetworkFiles,a | vector of strings. |
See the documentation for ActiveNetworks::read(string) for more details.
void SetOfActiveNetworks::read | ( | string | activeNetworkFile | ) |
Read ActiveNetworks from a file.
[in] | file,the | name of a file containing ActiveNetworks. |
The file contains ActiveNetworks stored in "itemset" format. Each line describes a single ActiveNetwork.
void SetOfActiveNetworks::readEdges | ( | string | edgesFile | ) |
Read edges in a set of ActiveNetworks from a file.
[in] | edgesFile,a | tab-delimited file containing all the edges in the ActiveNetworks. Each line contains the identifier of an ActiveNetwork, the identifiers of the two nodes incident on the edge, and the type of the edge. |
virtual void SetOfActiveNetworks::readMappingFromNetworkLegosToActiveNetworks | ( | string | nlsToRNsFile | ) | [inline, virtual] |
This function is defined in SetOfActiveNetworks only because of an implementation detail in NetMan::processComputedActiveNetworks(). Ideally, this method should be defined only in SetOfNetworkLegos.
Reimplemented in SetOfNetworkLegos.
void SetOfActiveNetworks::readNodeEnrichedFunctions | ( | string | nodeEnrichedFunctionsFile | ) |
Read ActiveNetwork-node-enriched-function triples from a file.
[in] | nodeEnrichedFunctionsFile,a | tab-delimited file previously output by invoking SetOfActiveNetworks::printNodeEnrichedFunctions(). |
void SetOfActiveNetworks::readNodeEnrichments | ( | string | nodeEnrichmentsFile | ) |
Read ActiveNetwork-node-enriched-function p-values from a file.
[in] | nodeEnrichmentsFile,a | tab-delimited file previously output by invoking SetOfActiveNetworks::printNodeEnrichments(). |
void SetOfActiveNetworks::readNodes | ( | string | nodesFile, |
MyGraph & | superGraph | ||
) |
Read nodes in a set of ActiveNetworks from a file.
[in] | nodesFile | a tab-delimited file containing all the nodes in the ActiveNetworks. Each line contains the identifier of an ActiveNetwork and the identifier of one nodes in that ActiveNetwork. |
[in] | superGraph | an instance of MyGraph of which the ActiveNetworks are subgraphs. |