Biorithm
1.1
|
Public Member Functions | |
MyAbstractGainAlgo (MyGainGraph &g, MyAnnotations &a, MyGainParams &p, Reporter &r, GeneOntology *go=NULL) | |
virtual void | computeCrossValidationResults (const BioFunction &function, const MyNodeIdList &cvNodes)=0 |
Compute results of cross validation. | |
virtual void | computeCut (MyNodeIdList &nodesToAnnotate, MyNodeIdSet &cutNodes) |
After assinging states to all nodes, compute the induced cut. | |
virtual void | computePredictions (const BioFunction &function, const MyNodeIdList &nodesToAnnotate, MyNodeIdList &predictedNodes)=0 |
Compute the confidence in each prediction. | |
virtual MyGainState< StateType > | computeState (MyNode &node)=0 |
virtual void | constructCrossValidationLists (vector< MyNodeIdList > &cvLists)=0 |
Construct lists of nodes for cross validation. | |
virtual bool | hasConverged (const MyNodeIdList &nodesToAnnotate)=0 |
virtual void | crossValidate (const BioFunction &function) |
virtual void | maskNodeStates (const MyNodeIdList &nodes)=0 |
"Forget" known annotations/states of nodes prior to cross validation. | |
virtual void | evaluatePredictions (MyAnnotations &newAnnotations) |
"Remember" known annotations/states of nodes after cross validation. | |
virtual string | getName ()=0 |
virtual void | initialiseNodeStates (const BioFunction &function, MyNodeIdList &nodesToAnnotate)=0 |
virtual void | pipeline (const BioFunction &function) |
The complete pipeline of computation for functional annotation. | |
virtual void | predict (const BioFunction &function) |
virtual void | run (const MyNodeIdList &nodesToAnnotate)=0 |
virtual void | setCrossValidationList (MyNodeIdList &nodesToAnnotate, const MyNodeIdList &cvList) |
virtual void | visualiseCrossValidation (const BioFunction ¤tFunction) |
virtual void | visualiseCut (const BioFunction ¤tFunction, MyNodeIdList &predictedNodes) |
Layout a graph that highlights the cut seprating nodes annotated with or predicted to be annotated with currentFunction from all the other nodes. | |
virtual void | visualisePredictions (const BioFunction ¤tFunction, MyNodeIdList &nodesToAnnotate) |
virtual void | initialiseEdgeWeights (const BioFunction &function) |
virtual void | initialiseEdgeWeightsCutoff (const BioFunction &function) |
virtual void | initialiseEdgeWeightsDepth (const BioFunction &function) |
virtual void | removeUnpredictableNodes (const MyNodeIdSet &unpredictableNodes, MyNodeIdList &oldNodes) |
Protected Attributes | |
MyAnnotations & | _annotations |
BioFunction | _currentFunction |
GeneOntology * | _go |
MyGainGraph & | _graph |
MyGainParams & | _params |
Reporter & | _reporter |
map< StateType, MyNodeIdList > | _nodesByInitialStateType |
map< StateType, MyNodeIdList > | _nodesByRealStateType |
map< MyNodeId, MyGainStateInfo < MyGainState< StateType > > > | _states |
map< MyNodeId, StateType > | _realStateTypes |
map< MyNodeId, StateType > | _initialStateTypes |
MyNodeIdSet | _cutNodes |
virtual void MyAbstractGainAlgo< StateType >::computeCrossValidationResults | ( | const BioFunction & | function, |
const MyNodeIdList & | cvNodes | ||
) | [pure 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.
Implemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusAllSinkSourceGainAlgo, and MyOneVersusAllGainAlgo.
virtual void MyAbstractGainAlgo< StateType >::computeCut | ( | MyNodeIdList & | nodesToAnnotate, |
MyNodeIdSet & | cutNodes | ||
) | [inline, virtual] |
After assinging states to all nodes, compute the induced cut.
An edge is inconsistent if it is incident on nodes with different states. We define the cut as the set of inconsistent edges. Removing these edges decomposes the graph into connected components such that in component, all nodes are in the same state. The method computes the nodes predicted to be annotated with the current function that are incident on edges in the cut.
[in] | nodesToAnnotate,the | list of nodes to be annotated. |
[out] | cutNodes,the | list of nodes in the cut. |
Reimplemented in MyOneVersusAllGainAlgo.
virtual void MyAbstractGainAlgo< StateType >::computePredictions | ( | const BioFunction & | function, |
const MyNodeIdList & | nodesToAnnotate, | ||
MyNodeIdList & | predictedNodes | ||
) | [pure virtual] |
Compute the confidence in each prediction.
For each prediction, compute the algorithm's confidence in the prediction as the distance of the node from the cut.
Implemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusNoneFunctionalFlowGainAlgo, MyOneVersusAllSinkSourceGainAlgo, MyOneVersusAllSemiHierarchicalHopfieldGainAlgo, and MyOneVersusAllGainAlgo.
virtual MyGainState< StateType > MyAbstractGainAlgo< StateType >::computeState | ( | MyNode & | node | ) | [pure virtual] |
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).
Implemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusNoneLocalGainAlgo, MyOneVersusNoneFunctionalFlowGainAlgo, MyOneVersusAllSinkSourceGainAlgo, MyOneVersusAllHopfieldGainAlgo, MyOneVersusAllLocalGainAlgo, and MyOneVersusAllGainAlgo.
virtual void MyAbstractGainAlgo< StateType >::constructCrossValidationLists | ( | vector< MyNodeIdList > & | cvLists | ) | [pure virtual] |
Construct lists of nodes for cross validation.
[out] | cvLists,a | vector of MyNodeIdLists. |
Each element of this vector contains a list of node ids (stored in a MyNodeIdList) whose annotation details should be deleted for cross validation. In the case of leave-one-out cross validation, each element of the vector will contain just one node.
Implemented in MyOneVersusAllGainAlgo.
void MyAbstractGainAlgo< StateType >::evaluatePredictions | ( | MyAnnotations & | newAnnotations | ) | [virtual] |
"Remember" known annotations/states of nodes after cross validation.
[in] | nodes,a | MyNodeIdList containing a list of node IDs for which I should unmask state and annotation information.Evaluate the predictions made by the algorithm based on the (new) annotations. |
The method compares the current annotations (on which the algorithm based the predictions) with newAnnotations. It first finds those genes for which the algorithm made predictions and that have new annotations in newAnnotations. For each such gene, the method computes the distance of each prediction to the closest new annotation for that gene. The method outputs results to a file.
virtual string MyAbstractGainAlgo< StateType >::getName | ( | ) | [pure virtual] |
Return the name of the algorithm.
Implements MyReallyAbstractGainAlgo.
Implemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusNoneLocalGainAlgo, MyOneVersusNoneFunctionalFlowGainAlgo, MyOneVersusNoneSinkSourceGainAlgo, MyOneVersusAllSinkSourceGainAlgo, MyOneVersusAllSVMLightTransductiveGainAlgo, MyOneVersusAllSVMLightGainAlgo, MyOneVersusAllLibSVMGainAlgo, MyOneVersusAllHierarchicalHopfieldGainAlgo, MyOneVersusAllSemiHierarchicalHopfieldGainAlgo, MyOneVersusAllMincutGainAlgo, MyOneVersusAllHopfieldGainAlgo, MyOneVersusAllLocalGainAlgo, MyOneVersusNoneGainAlgo, and MyOneVersusAllGainAlgo.
virtual void MyAbstractGainAlgo< StateType >::maskNodeStates | ( | const MyNodeIdList & | nodes | ) | [pure virtual] |
"Forget" known annotations/states of nodes prior to cross validation.
[in] | nodes,a | MyNodeIdList containing a list of node IDs for which I should mask state and annotation information. |
Implemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusAllSinkSourceGainAlgo, and MyOneVersusAllGainAlgo.
void MyAbstractGainAlgo< StateType >::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.
Reimplemented in MyOneVersusAllGeneManiaGainAlgo, MyOneVersusNoneSinkSourceGainAlgo, MyOneVersusAllAbstractSVMGainAlgo, and MyOneVersusNoneGainAlgo.
void MyAbstractGainAlgo< StateType >::visualiseCrossValidation | ( | const BioFunction & | currentFunction | ) | [virtual] |
Layout the functional linkage network to visualise the results.
void MyAbstractGainAlgo< StateType >::visualiseCut | ( | const BioFunction & | currentFunction, |
MyNodeIdList & | predictedNodes | ||
) | [virtual] |
Layout a graph that highlights the cut seprating nodes annotated with or predicted to be annotated with currentFunction from all the other nodes.
The method lays out the graph induced by the edges in the cut and all the nodes on the "currentFunction" side of the cut.
Reimplemented in MyOneVersusAllAbstractSVMGainAlgo, and MyOneVersusAllGainAlgo.