\name{ontology-class} \docType{class} \alias{ontology-class} \alias{ontology} \alias{name} \alias{OVersion} \alias{name,ontology-method} \alias{OVersion,ontology-method} \alias{show,ontology-method} \alias{makeOntology} \alias{rDAG,ontology-method} \alias{accessMat,ontology-method} \alias{rDAG} \title{Class "ontology" wraps a rooted DAG with some ontology metadata } \description{ instances of class ontology are used to represent things like Gene Ontology } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("ontology", ...)}. This simply possesses information on name and version of ontology. } \section{Slots}{ \describe{ \item{\code{name}:}{Object of class \code{"character"} name of ontology } \item{\code{version}:}{Object of class \code{"character"} version tag } \item{\code{rDAG}:}{Object of class \code{"rootedDAG"} the rooted DAG representing the terminlogy hierarchy } } } \section{Methods}{ \describe{ \item{accessMat}{\code{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} \item{name}{\code{signature(x = "ontology")}: access name } \item{OVersion}{\code{signature(x = "ontology")}: access version} \item{rDAG}{\code{signature(x = "ontology")}: access the rooted DAG } \item{show}{\code{signature(object = "ontology")}: concise report } } } %\references{ ~put references to the literature/web site here ~ } \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. } % ~Make other sections like Warning with \section{Warning }{....} ~ %\seealso{ % ~~objects to See Also as \code{\link{~~fun~~}}, ~~~ % or \code{\link{CLASSNAME-class}} for links to other classes %} \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)) } \keyword{classes}