Ontology-class: Class '"Ontology"'

Description Details Objects from the Class Slots Methods and functions Author(s) Examples

Description

Ontologies are stored as Ontology and Ontologies instances, and contain various information as provided by the Ontology Lookup Service.

Details

Ontologies are referred to by their namespace, which is lower case: the Gene Onology is "go", the Mass spectrometry ontology is "ms", etc. The ontologies also have prefixes, which are upper case: the Gene Onology prefix "GO", the Mass spectrometry ontology prefix "MS". The only exception to this rule is the Drosophila Phenotype Ontology, whose namespace and prefix are "dpo" and "FBcv" respectively. This is particularly confusing as the FlyBase Controlled Vocabulary has "fbcv" and "FBcv" as namespace and prefix respectively.

When using a character to initialise an ontology or query a term, "fbcv" (this is case insensitive) will refer to the the FlyBase Controlled Vocabulary. The the Drosophila Phenotype Ontology will have to be referred as "dpo" (also case insensitive).

Objects from the Class

Objects can be created in multiple ways. The Ontologies function will initialise all available ontolgies as an Ontologies object, while a call to Ontology with an ontology namespace or prefix (but see Details section) as argument will initialise the ontology of interest as an Ontology instance.

Ontolgies instances can be subset with [ and [[ (using their namespace, see Details) and iterated over with lapply. Ontolgies can be converted into a simple data.frame containing the ontology prefixes, namespaces and titles using as(., "data.frame")). An Ontologies can also be coerced to lists of Ontology ojects with as(., "list").

Slots

loaded:

Object of class NULL or character containing the date the ontology was loaded on the backend side. Accessed with the olsLoaded method.

updated:

Object of class NULL or character containing the date the ontology was last updated on the backend side. Accessed with the olsUpdated method.

status:

Object of class NULL or character documenting the status of the ontology on the backend side. For example "LOADED", "FAILED" or "NOTLOADED". Accessed with the olsStatus method.

message:

Object of class NULL or character documentating the status of the ontology on the backend side.

version:

Object of class NULL or character documenting the version of the ontology. Note that there is also a version field in the config slot below. Use olsVersion to access the appropriate date.

numberOfTerms:

Object of class "integer" documenting the number of terms available in the ontology.

numberOfProperties:

Object of class "integer" documenting the number of properties available in the ontology.

numberOfIndividuals:

Object of class "integer" documenting the number of individuals available in the ontology.

config:

Object of class "list" containing further ontology configuration and metadata.

Methods and functions

Ontologies

signature(object = "numeric"):

Ontology

signature(object = "character"):

olsDesc

signature(object = "Ontology"): returns the description of an ontology. Also works for Ontologies objects and character describing an ontology namespace or prefix (see Details).

olsPrefix

signature(object = "Ontology"): retruns the prefix of an ontology. Also works for Ontologies objects describing an ontology namespace or prefix (see Details).

olsRoot

signature(object = "Ontology"): returns the root of the ontology as a Terms instance. object could also be a character with an ontology namespace or prefix (see Details). If object is of class Ontologies, it returns a list of Terms.

olsVersion

signature(object = "Ontology"): returns the version of the ontology. Also works with an ontology namespace or prefix (see Details) as a character or an object of class Ontologies, in which case it returns a list of versions.

olsLoaded

signature(object = "Ontology"): returns the loading date of the ontology. Also works with a character containing the ontology namespace or prefix (see Details) or an object of class Ontologies.

olsUpdated

signature(object = "Ontology"): returns the update date of the ontology. Also works with a character containing the ontology namespace or prefix (see Details) or an object of class Ontologies.

olsStatus

signature(object = "Ontology"): returns the status of the ontology. Also works with a character containing the ontology namespace or prefix (see Details) or an object of class Ontologies.

olsStatus

signature(object = "Ontology"): returns the namespace of the ontology. Also works with a character containing the ontology namespace or prefix (see Details) or an object of class Ontologies.

olsTitle

signature(object = "Ontology"): returns the title of an ontology. Also works with a character containing the ontology namespace or prefix (see Details) or an object of class Ontologies.

show

signature(object = "Ontology"): prints a short summary of Ontology and Ontologies objects.

length

signature(object = "Ontologies"): returns the number of ontolgies described by the Ontologies object.

all.equal

signature(target = "Ontologies", current = "Ontologies"): ...

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Get all ontolgies
ol <- Ontologies()
ol

head(as(ol, "data.frame"))
length(ol)

## Individual ontologies
(go <- ol[["go"]]) 
(efo <- ol[["efo"]])

## some basic information
olsVersion(go)
olsDesc(go)
olsTitle(go)
olsPrefix(go)
olsNamespace(go)

olsRoot(go)

## works with Ontology objects or their namespace
identical(olsRoot("go"), olsRoot(go))
identical(olsVersion("go"), olsVersion(go))

## Directly initialise a single ontology
go1 <- Ontology("go") ## using the namespace (preferred)
go2 <- Ontology("GO") ## using the prefix (see Details)
all.equal(go, go1)
all.equal(go, go2)

rols documentation built on April 1, 2021, 6:01 p.m.