olsOntologies: olsOntologies

olsOntologiesR Documentation

olsOntologies

Description

The rols package provides an interface to PRIDE's Ontology Lookup Servive (OLS) and can be used to query one or multiple ontologies, stored as 'olsOntology' and 'olsOntologies' instances, and containing various information as provided by OLS.

Usage

## S4 method for signature 'missing'
olsOntologies(object)

## S4 method for signature 'character'
olsOntology(object)

## S4 method for signature 'olsOntology'
olsOntology(object)

## S4 method for signature 'olsOntology'
show(object)

## S4 method for signature 'olsOntologies'
show(object)

## S4 method for signature 'character'
olsVersion(object)

## S4 method for signature 'olsOntology'
olsVersion(object)

## S4 method for signature 'olsOntologies'
olsVersion(object)

## S4 method for signature 'character'
olsLoaded(object)

## S4 method for signature 'olsOntology'
olsLoaded(object)

## S4 method for signature 'olsOntologies'
olsLoaded(object)

## S4 method for signature 'olsOntology'
olsLinks(object)

## S4 method for signature 'olsOntology'
olsConfig(object)

## S4 method for signature 'character'
olsUpdated(object)

## S4 method for signature 'olsOntology'
olsUpdated(object)

## S4 method for signature 'olsOntologies'
olsUpdated(object)

## S4 method for signature 'character'
olsPrefix(object)

## S4 method for signature 'olsOntology'
olsPrefix(object)

## S4 method for signature 'olsOntologies'
olsPrefix(object)

## S4 method for signature 'character'
olsDesc(object)

## S4 method for signature 'olsOntology'
olsDesc(object)

## S4 method for signature 'olsOntologies'
olsDesc(object)

## S4 method for signature 'character'
olsTitle(object)

## S4 method for signature 'olsOntology'
olsTitle(object)

## S4 method for signature 'olsOntologies'
olsTitle(object)

## S4 method for signature 'character'
olsStatus(object)

## S4 method for signature 'olsOntology'
olsStatus(object)

## S4 method for signature 'olsOntologies'
olsStatus(object)

## S4 method for signature 'character'
olsNamespace(object)

## S4 method for signature 'olsOntology'
olsNamespace(object)

## S4 method for signature 'olsOntologies'
olsNamespace(object)

## S4 method for signature 'character'
ontologyUrl(object)

## S4 method for signature 'olsOntology'
ontologyUrl(object)

## S4 method for signature 'olsOntologies'
lapply(X, FUN, ...)

## S4 method for signature 'olsOntologies'
x[i, j = "missing", drop = "missing"]

## S4 method for signature 'olsOntologies'
x[[i, j = "missing", drop = "missing"]]

## S4 method for signature 'olsOntologies'
length(x)

Arguments

object

an instance of class 'olsOntologies' or 'olsOntology'. For some functions, a ontology identifier is applicable.

X

'olsOntologies' object.

FUN

a 'function' to be applied to each 'olsOntology' element of 'X'.

...

additional arguments passed to 'FUN'.

x

an 'olsOntologies' object.

i

index of elecements to subset.

j

ignored.

drop

ignored.

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". One exception to this rule is the Drosophila Phenotype Ontology, whose namespace and prefix are "dpo" and "FBcv" respectively (there might be more). 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).

Constructors

Objects can be created in multiple ways. The [olsOntologies()] function will initialise all available ontolgies as an 'olsOntologies' object, while a call to [olsOntology()] with an ontology namespace or prefix as argument will initialise the ontology of interest as an 'olsOntology' 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")'. 'olsOntologies' can also be coerced to lists of 'olsOntology' ojects with 'as(., "list")'.

Accessors

- 'olsDesc(object = "olsOntology")' returns the description of an ontology. Also works for 'olsOntologies' objects and a 'character' describing an ontology namespace or prefix (see Details).

- 'olsPrefix(object = "olsOntology")' retruns the prefix of an ontology. Also works for 'olsOntologies' objects and a 'character' describing an ontology namespace or prefix (see Details).

- 'olsVersion(object = "olsOntology")' returns the version of the ontology. Also works with an a 'character' defining an ontology namespace or prefix (see Details) or an object of class 'olsOntologies', in which case it returns a list of versions.

- 'olsLoaded(object = "olsOntology")' 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 'olsOntologies'.

- 'olsUpdated(object = "olsOntology")' 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 'olsOntologies'.

- 'olsStatus(object = "olsOntology")' returns the status of the ontology. Also works with a 'character' containing the ontology namespace or prefix (see Details) or an object of class 'olsOntologies'.

- 'olsTitle(object = "olsOntology")' returns the title of an ontology. Also works with a 'character' containing the ontology namespace or prefix (see Details) or an object of class 'olsOntologies'.

- 'olsNamespace(object = "olsOntology")' returns the namespace of an ontology. Also works with a 'character' containing the ontology namespace or prefix (see Details) or an object of class 'olsOntologies'.

- 'olsLinks(object = "olsOntology")' returns a named 'character' with hyperlink to the ontology itself, and other associated concepts such as its terms.

- 'olsConfig(object = "olsOntology")' returns a list of additional unstructured, partly redundant information about the ontology.

- 'ontologyUrl(object = "olsOntology") return the hyperlink to the ontology itself. It can also be used with a 'character' defining the namespace or prefix of an ontology, in which case it is created from the base OLS API URL.

Ontology terms

Once an ontology has been created an an 'olsOntology' instance, all its terms can be requested using the 'Terms()' constructor. See [Terms()] for details.

Author(s)

Laurent Gatto

References

- OLS3 API (the OLS4 API should function identically to the OLS3): <http://www.ebi.ac.uk/ols4/ols3help>

- REST API for OLS: <https://www.ebi.ac.uk/ols4/swagger-ui/index.html>

Examples


#############################
## All ontologies
(onts <- olsOntologies())

#############################
## Alzheimer's Disease Ontology (ADO)
## 1. From the ontologies object
(ado1 <- onts[['ado']])
## 2. Create from its namespace
(ado2 <- olsOntology('ado')) ## also works with ADO

all.equal(ado1, ado2)

olsVersion(ado1)
olsPrefix(ado1)
olsNamespace(ado1)
olsTitle(ado1)
olsDesc(ado1)
olsLinks(ado1)
str(olsConfig(ado1))

lgatto/rols documentation built on April 29, 2024, 12:20 p.m.