Biorithm  1.1
Public Member Functions | Public Attributes | Protected Attributes
MyOneVersusAllGeneManiaGainAlgo Class Reference

This class is a subclass of MyOneVersusAllGainAlgo class which implements the GeneMANIA algorithm (Mostafavi, et al, 2008). This algorithm is a ---------- algorithm where the discriminant values of the negative and positive examples are allowed to change throught the running of the algorithm. More...

#include <gain-algorithm.h>

Inheritance diagram for MyOneVersusAllGeneManiaGainAlgo:
MyOneVersusAllGainAlgo MyAbstractGainAlgo< MyGainTriStateType > MyReallyAbstractGainAlgo

List of all members.

Public Member Functions

 MyOneVersusAllGeneManiaGainAlgo (MyGainGraph &g, MyAnnotations &a, MyGainParams &p, Reporter &r, GeneOntology *go=NULL)
virtual void maskNodeStates (const MyNodeIdList &nodes)
virtual void initialiseNodeStates (const BioFunction &function, MyNodeIdList &nodesToAnnotate)
virtual void computePredictions (const BioFunction &function, const MyNodeIdList &nodesToAnnotate, MyNodeIdList &predictedNodes)
virtual void computeCrossValidationResults (const BioFunction &function, const MyNodeIdList &cvNodes)
 Compute results of cross validation.
virtual MyGainTriState computeState (MyNode &node)
virtual MyGainTriState computeStateImplicit (MyNode &node)
virtual bool hasConverged (const MyNodeIdList &nodes)
 Check if the states of the nodes in the argument nodes have converged.
virtual void setCrossValidationList (MyNodeIdList &nodesToAnnotate, const MyNodeIdList &cvList)
virtual void redoBias ()
virtual string getName ()
virtual void run (const MyNodeIdList &nodesToAnnotate)

Public Attributes

MyNT hypotheticalNodeBiasValue

Protected Attributes

const MyNT _ANN_RES
const MyNT _NOT_RES
const unsigned int sinkSourceTest

Detailed Description

This class is a subclass of MyOneVersusAllGainAlgo class which implements the GeneMANIA algorithm (Mostafavi, et al, 2008). This algorithm is a ---------- algorithm where the discriminant values of the negative and positive examples are allowed to change throught the running of the algorithm.

Citation: Mostagavi, S, Ray, D, Warde-Farley, D, Grouios, C, & Morris, Q. (2008). GeneMANIA: a real-time multiple association network integration algorithm for predicting gene function. Genome Biology, 9(S4). Link to Paper: http://www.ncbi.nlm.nih.gov/pubmed/18613948 Full Text: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2447538/?tool=pubmed


Member Function Documentation

void MyOneVersusAllGeneManiaGainAlgo::computeCrossValidationResults ( const BioFunction function,
const MyNodeIdList &  cvNodes 
) [virtual]

Compute results of cross validation.

After invoking crossValidate(), compute the results. Each algorithm needs to define this method, since the algorithm stores the node states.

Reimplemented from MyOneVersusAllGainAlgo.

void MyOneVersusAllGeneManiaGainAlgo::computePredictions ( const BioFunction function,
const MyNodeIdList &  nodesToAnnotate,
MyNodeIdList &  predictedNodes 
) [virtual]

Compute which genes in nodesToAnnotate MyOneVersusAllGainAlgo::run() predicts has the function. Since different algorithms may have different methods for predicting a function, this method must be implemented separately for each class.

Parameters:
nodesToAnnotate,aninstance of MyNodeIdList, the nodes that run() tried to annotate.
predictedNodes,aninstance of MyNodeIdList, the nodes that run() predicts as having the function.

Reimplemented from MyOneVersusAllGainAlgo.

In order to copmpute the state of any node in the network, GeneMANIA solves the following equation where f_{i} is the node score for gene i, y_{i} is the inital bias vale for gene i, and w_{ij} is the association weight between genes i and j. $f=min({i}{}(f_{i}-y_{i})^{2}+{i}{}{j}{}w_{ij}(f_{i}-f_{j})^{2}) This equation reduces down to $f(u)={y(u)+ w_{u}f(u)}{1+ w_{v}f(v)}$ For more information about this formula, see the paper (cited in the class documentation).

Reimplemented from MyOneVersusAllGainAlgo.

virtual string MyOneVersusAllGeneManiaGainAlgo::getName ( ) [inline, virtual]

Return the name of the algorithm.

Reimplemented from MyOneVersusAllGainAlgo.

bool MyOneVersusAllGeneManiaGainAlgo::hasConverged ( const MyNodeIdList &  nodesToAnnotate) [virtual]

Check if the states of the nodes in the argument nodes have converged.

Reimplemented from MyOneVersusAllGainAlgo.

void MyOneVersusAllGeneManiaGainAlgo::initialiseNodeStates ( const BioFunction function,
MyNodeIdList &  nodesToAnnotate 
) [virtual]

********************************************* MyOneVersusAllGeneManiaGainAlgo

Reimplemented from MyOneVersusAllGainAlgo.

void MyOneVersusAllGeneManiaGainAlgo::maskNodeStates ( const MyNodeIdList &  nodes) [virtual]

For every node ID in nodes, "forget" its state information and unclamp it, so that MyOneVersusNoneGainAlgo::run() can modify the state of that node.

Parameters:
[in]nodes,thelist of node whose initial state must be masked.

Reimplemented from MyOneVersusAllGainAlgo.

Compute which genes in nodesToAnnotate MyOneVersusAllHeavisideGainAlgo::run() predicts has the function. After calling this method, invoking the report() method will print out information on all the predictions.

Parameters:
[in]nodesToAnnotate,aninstance of MyNodeIdList, the nodes that run() tried to annotate.
[out]predictedNodes,aninstance of MyNodeIdList, the nodes that run() predicts as having the function. For this algorithm, predictedNodes is the same as nodesToAnnotate, since the algorithm predicts all nodes as having the function but assings a confidence value for each prediction.
void MyOneVersusAllGeneManiaGainAlgo::run ( const MyNodeIdList &  nodesToAnnotate) [virtual]

This method repeatedly iterates over all the nodes in nodesToAnnotate in the order in which they occur in nodesToAnnotate. It computes the state of each node in this list. The method iterates until the states converge.

Reimplemented from MyOneVersusAllGainAlgo.

void MyOneVersusAllGeneManiaGainAlgo::setCrossValidationList ( MyNodeIdList &  nodesToAnnotate,
const MyNodeIdList &  cvList 
) [virtual]

Given a list of unannotated nodes (nodesToAnnotate) and a list of nodes to cross validate (cvList),update nodesToAnnotate to include nodes in cvList, so that the annotation algorithm also annotates the nodes in cvList.

Warning:
Call this method only after invoking maskNodeStates().
Note:
This method is virtual since some algorithms can set nodesToAnnotate to be equal to cvList, for example, algorithms that use only one round of "guilt-by-association," where each node computes its state from the states of its neighbours.

Reimplemented from MyAbstractGainAlgo< MyGainTriStateType >.


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