|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.hust.go.model.GoGraphModel
A graph model is constructed by the connection in GO terms. It can be used to construct GUI by edu.hust.go.gui.GraphCreator.
Constructor Summary | |
GoGraphModel(java.util.HashMap map)
|
Method Summary | |
SimpleDirectedGraph |
buildSubGraph(java.util.ArrayList goTerms,
int parentLevel,
int childLevel)
extract sub graph from GO graph, the sub graph contains a set of target go terms , and related in the pathway from the root to its leaf nodes, for example, one pathway is A->B->C->Target->D->E->F, while A is root and F is leaf, and suppose parentLevel and childLevel are both 1, then the nodes C, Taraget, and D are extracted intio the subGraph, the the related edges are extracted into the subGraph too. |
float |
evalSimilarity(edu.hust.go.term.GO_term node1,
edu.hust.go.term.GO_term node2)
|
float |
evalSimilarity(edu.hust.go.term.GO_term node1,
edu.hust.go.term.GO_term node2,
byte type)
evaluate the similarity of two nodes in directed acylic graph |
java.util.HashSet |
getCommonParents(java.util.ArrayList goTerms)
get the common parents in the pathway of target go terms. |
SimpleDirectedGraph |
getGraph()
get the whole GO graph |
static java.lang.Object[] |
getLeave(SimpleDirectedGraph subGraph)
the leave are defindes as the nodes which has no outgoing edges. |
java.util.HashSet |
getObsoleteSet()
get obsolete terms in the go definition |
java.util.HashMap |
getPathsBetweenNodes(edu.hust.go.term.GO_term node1,
edu.hust.go.term.GO_term node2)
get pathway between two Go terms |
java.lang.Object[][] |
getPathsOfNode2Root(edu.hust.go.term.GO_term node)
|
static java.lang.Object[] |
getRoots(SimpleDirectedGraph subGraph)
the roots are defined as the nodes which has no incoming edges. |
java.util.HashMap |
getRootVertexesMap()
get the roots of the whole GO graph |
boolean |
inOnePathway(edu.hust.go.term.GO_term node1,
edu.hust.go.term.GO_term node2)
Tell whether two nodes are in one pathway |
static java.util.HashMap |
loadGoDefinition(java.lang.String definition,
byte defType)
Construct a map between GO id and GO terms |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GoGraphModel(java.util.HashMap map) throws GoException
map
- the key is Go ids, the value is GO terms.
InvalidGoDefinitionException
- there are problems in GO definition
file, such as one id is connected to another id, while the latter is not
exist in fact. Please make sure that the definition file comes from GO
official site: www.geneontology.org
or ftp.geneontology.org.
GoException
Method Detail |
public SimpleDirectedGraph buildSubGraph(java.util.ArrayList goTerms, int parentLevel, int childLevel)
goTerms
- query termsparentLevel
- the depth from one target term to rootchildLevel
- the depth from one target term to leaf
public java.util.HashSet getCommonParents(java.util.ArrayList goTerms)
goTerms
- target go terms
public float evalSimilarity(edu.hust.go.term.GO_term node1, edu.hust.go.term.GO_term node2)
evalSimilarity(GO_term node1,GO_term node2, byte type)
public float evalSimilarity(edu.hust.go.term.GO_term node1, edu.hust.go.term.GO_term node2, byte type)
node1
- one of the two nodesnode2
- one of the two nodestype
- one of the following five values.
public java.lang.Object[][] getPathsOfNode2Root(edu.hust.go.term.GO_term node)
node
- the target node
public boolean inOnePathway(edu.hust.go.term.GO_term node1, edu.hust.go.term.GO_term node2)
node1
- one of the two nodesnode2
- one of the two nodes
public java.util.HashMap getPathsBetweenNodes(edu.hust.go.term.GO_term node1, edu.hust.go.term.GO_term node2)
node1
- node2
-
public static java.lang.Object[] getRoots(SimpleDirectedGraph subGraph)
subGraph
-
public static java.lang.Object[] getLeave(SimpleDirectedGraph subGraph)
subGraph
-
public SimpleDirectedGraph getGraph()
public java.util.HashMap getRootVertexesMap()
public java.util.HashSet getObsoleteSet()
public static java.util.HashMap loadGoDefinition(java.lang.String definition, byte defType) throws GoException
definition
- GO defineion file
GoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |