cytoscape.data.annotation
Class Ontology
java.lang.Object
cytoscape.data.annotation.Ontology
- All Implemented Interfaces:
- Serializable
public class Ontology
- extends Object
- implements Serializable
Contains a collection of OntologyTerms, each of which may have pointers
to other terms, creating a hierarchical controlled vocabulary. The pointers
may express either "parent/child" relationships, or "container/contained"
relationships. Objects of this class each aggregate a full set of
related terms, creating a distinct ontology of a certain type, like KEGG's metabolic
pathways, or GeneOntology's biological processes. Extensive navigational
methods are provided so that, for instance, the full leaf-to-root biological
process hierarchies which may exist for a given gene are conveniently
returned.
- See Also:
- Serialized Form
Ontology
public Ontology(String curator,
String ontologyType)
- Parameters:
curator
- The institute or group which maintains this ontologyontolotyType
- The nature of this ontology, eg, "metabolic pathway",
"molecular function", or "cellular component"
getCurator
public String getCurator()
getType
public String getType()
add
public void add(OntologyTerm newTerm)
size
public int size()
getTerms
public HashMap getTerms()
containsTerm
public boolean containsTerm(int id)
getTerm
public OntologyTerm getTerm(int id)
getAllHierarchyPaths
public int[][] getAllHierarchyPaths(int termID)
- get all unique paths from the termID to the root of the ontology, in reverse
order, with the most general classification first, and most specific last. for some
terms, this will be a path, possibly with only one member. for other terms,
which have be assigned to multiple categories, there will be multiple paths.
furthermore, some categories belong to multiple pathways, further increasing
the number of paths implicit in the termID.
getAllHierarchyPathsAsNames
public String[][] getAllHierarchyPathsAsNames(int termID)
- get all unique paths as a set of names, from termID to the root of the ontology,
in reverse order, from most general to most specific. for some
terms, this will be a path, possibly with only one member. for other terms,
which have be assigned to multiple categories, there will be multiple paths.
furthermore, some categories belong to multiple pathways, further increasing
the number of paths implicit in the termID.
getDescription
public OntologyDescription getDescription()
toString
public String toString()
- Overrides:
toString
in class Object