| ontology-class {ontoTools} | R Documentation |
instances of class ontology are used to represent things like Gene Ontology
Objects can be created by calls of the form new("ontology", ...).
This simply possesses information on name and version of ontology.
name:"character" name of ontology version:"character" version tag rDAG:"rootedDAG" the rooted
DAG representing the terminlogy hierarchy signature(object = "ontology"): returns
square matrix with 1 in element r,c if term corresponding
to r can be reached from term corresponding to csignature(x = "ontology"): access name signature(x = "ontology"): access versionsignature(x = "ontology"): access the rooted DAG signature(object = "ontology"): concise report This class was written to deal with ontologies that are representable as rooted DAGs. It is not clear that this is a good use of the term 'ontology', which has broader implications. However this does work for Gene Ontology.
~~who you are~~
data(litOnto)
print(litOnto)
g1 <- new("rootedDAG", DAG=litOnto, root="A")
o1 <- new("ontology", name="demo", version="0.1",
rDAG=g1)
# can also use
o1b <- makeOntology( name="demo", version="0.1",
graph=litOnto, root="A")
show(o1)
print(accessMat(o1))
print(OVersion(o1))