ontology-class {ontoTools}R Documentation

Class "ontology" wraps a rooted DAG with some ontology metadata

Description

instances of class ontology are used to represent things like Gene Ontology

Objects from the Class

Objects can be created by calls of the form new("ontology", ...). This simply possesses information on name and version of ontology.

Slots

name:
Object of class "character" name of ontology
version:
Object of class "character" version tag
rDAG:
Object of class "rootedDAG" the rooted DAG representing the terminlogy hierarchy

Methods

accessMat
signature(object = "ontology"): returns square matrix with 1 in element r,c if term corresponding to r can be reached from term corresponding to c
name
signature(x = "ontology"): access name
OVersion
signature(x = "ontology"): access version
rDAG
signature(x = "ontology"): access the rooted DAG
show
signature(object = "ontology"): concise report

Note

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.

Author(s)

~~who you are~~

Examples

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))

[Package ontoTools version 1.6.0 Index]