Biorithm  1.1
Public Member Functions | Protected Member Functions | Protected Attributes
MyOneVersusAllSinkSourceGainAlgo Class Reference
Inheritance diagram for MyOneVersusAllSinkSourceGainAlgo:
MyOneVersusAllGainAlgo MyAbstractGainAlgo< MyGainTriStateType > MyReallyAbstractGainAlgo MyOneVersusNoneSinkSourceGainAlgo

List of all members.

Public Member Functions

 MyOneVersusAllSinkSourceGainAlgo (MyGainGraph &g, MyAnnotations &a, MyGainParams &p, Reporter &r, GeneOntology *go=NULL)
virtual ~MyOneVersusAllSinkSourceGainAlgo ()
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 bool hasConverged (const MyNodeIdList &nodes)
 Check if the states of the nodes in the argument nodes have converged.
virtual string getName ()
virtual void run (const MyNodeIdList &nodesToAnnotate)

Protected Member Functions

virtual void _applyArtificialSink (const MyNode &node, MyNT &num, MyNT &den)
virtual void _applyArtificialSource (const MyNode &node, MyNT &num, MyNT &den)

Protected Attributes

const MyNT _ANN_RES
const MyNT _HYP_RES
const MyNT _NOT_RES
map< string, map< string, MyNT > > _helperWeights
MyNT _lambda
MyNT _mu

Constructor & Destructor Documentation

The constructor

The destructor.


Member Function Documentation

void MyOneVersusAllSinkSourceGainAlgo::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 MyOneVersusAllSinkSourceGainAlgo::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.

This method should be a member of this class since the method needs access to the states of the nodes (stored in subclasses of the class).

Reimplemented from MyOneVersusAllGainAlgo.

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

Return the name of the algorithm.

Reimplemented from MyOneVersusAllGainAlgo.

Reimplemented in MyOneVersusNoneSinkSourceGainAlgo.

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

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

Reimplemented from MyOneVersusAllGainAlgo.

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

Initialise the states of the nodes in the graph. Each node annotated with function gets the state ANNOTATED_STATE; these nodes are "clamped," i.e., the algorithm will not change their states. All other nodes get the state HYPOTHETICAL_STATE. The algorithm may change the states of these nodes. In other words, these nodes are not clamped. The argument nodesToAnnotate contains the IDs of the unclamped nodes.

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

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

Reimplemented from MyOneVersusAllGainAlgo.

Reimplemented in MyOneVersusNoneSinkSourceGainAlgo.

void MyOneVersusAllSinkSourceGainAlgo::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.

void MyOneVersusAllSinkSourceGainAlgo::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.


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