|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uk.ac.ebi.intact.application.goDensity.business.data.Key2HashSet
|
+--uk.ac.ebi.intact.application.goDensity.business.dag.FastGoDag
Represents GO-Graph (hierarchy) with fast and direct JDBC access to db.
Before you can use this class,
- GoTools.insertGoDag(CvGoNode.class, new IntactHelper(), go.ontology);
- CalcBinInteractionData.java
must be executed to fill external ia_goDens_tables.
| Field Summary |
| Fields inherited from class uk.ac.ebi.intact.application.goDensity.business.data.Key2HashSet |
_key2HashSet, _values |
| Method Summary | |
void |
finalize()
close all sql-statements properly - should be called once FastGoDag instance is not needed any more -> don't trust the automatic finalisation! |
java.util.Collection |
getAllChilds(java.lang.String goId)
|
GoGoDensity[][] |
getBinaryInteractions(java.util.List distinctGoIds,
boolean onlyPrecalcDens)
For a Set of GoIds the - possible binary Interactions and - all real existing Interactions which (could) occur in or within the two goIds are calculated and encapsulated in GoGoDensities. |
java.util.Collection |
getChilds(java.lang.String goId)
|
java.lang.String |
getGoTermFullname(java.lang.String goId)
|
java.lang.String |
getGoTermShort(java.lang.String goId)
|
static FastGoDag |
getInstance()
get a instance of FastGoDag -> it's a singleton |
java.util.HashSet |
getInteractors(java.lang.String goId)
|
boolean |
isaOrPartOf(java.lang.String goId1,
java.lang.String goId2)
test, if goId1 equals goId2 or if goId1 is a child or subchild of goId2 |
java.util.Set |
isGoIdInDag(java.util.Set distinctGoIds)
Test, if one or more of the goIds is not in contained in dag. |
java.util.Set |
isInSameGraphPath(java.util.Set distinctGoIds)
test all goIds of a Set of GoIds, which are in the same graph path |
boolean |
isInSameGraphPath(java.lang.String goId1,
java.lang.String goId2)
test, if goId1 is in the same graph path of goId2 |
void |
precalcDensity(int untilDepth)
precalculate all densities for binaryInteractions between various go-nodes. |
void |
precalcDensity(java.util.Set goIds)
precalculation of the go densities by a set of go-ids |
void |
refreshDbConnection()
test if the connection to db is still available and if not, it reconnect to the db - used my default where ever sql-statements are used. |
| Methods inherited from class uk.ac.ebi.intact.application.goDensity.business.data.Key2HashSet |
add, containsKey, getAll, getKeys, getValueByKey, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static FastGoDag getInstance()
public void finalize()
finalize in class java.lang.Objectpublic void refreshDbConnection()
public java.util.Collection getChilds(java.lang.String goId)
throws KeyNotFoundException
goId - (node) for which the children want to be known.
KeyNotFoundExceptionpublic java.util.Collection getAllChilds(java.lang.String goId)
goId - (node) for which all children and subchildren want to be known.
public boolean isaOrPartOf(java.lang.String goId1,
java.lang.String goId2)
goId2 - goId1 -
public boolean isInSameGraphPath(java.lang.String goId1,
java.lang.String goId2)
goId2 - goId1 -
public java.util.Set isInSameGraphPath(java.util.Set distinctGoIds)
distinctGoIds - which should be tested
public java.util.Set isGoIdInDag(java.util.Set distinctGoIds)
distinctGoIds - which should be tested
public void precalcDensity(java.util.Set goIds)
throws GoIdNotInDagException
goIds - for which densities should be precalculated
GoIdNotInDagExceptionpublic void precalcDensity(int untilDepth)
untilDepth - depth from root element. E.g. "2" means, every go-node from level 0 (root)
to level 2 (including) will be taken into account. If you set the value to any negative value,
the max depth of the graph will be used!
public GoGoDensity[][] getBinaryInteractions(java.util.List distinctGoIds,
boolean onlyPrecalcDens)
throws GoIdNotInDagException,
SameGraphPathException
distinctGoIds - a Set of goIds in which we are interested in. Each possible
go-go-combination (out of the Set) will be covered by this method. IMPORTANT:
goIds must be distinct - I use a List for various reasons here - so you have
to take care about unique goIds before!!!
e.g: List is: a, b, c, d
2nd dimension
--------------------------
0 a | aa
1 b | ba bb
2 c | ca cb cc
3 d | da db dc dd
-----|---------------------
| a b c d
| 0 1 2 3 1st dimension
GoIdNotInDagException
SameGraphPathException
public java.util.HashSet getInteractors(java.lang.String goId)
throws KeyNotFoundException
goId - (node) for which all Interactor_acs want to be known.
KeyNotFoundException - if goId was not found in dbpublic java.lang.String getGoTermShort(java.lang.String goId)
goId - e.g. "GO:0003673"
public java.lang.String getGoTermFullname(java.lang.String goId)
goId -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||