Learn R Programming

rols (version 1.12.0)

term: Returns the term of a given identifier

Description

This function returns the term (description) of a given ontology identifier in a specific ontology. The ontology name must be valid, i.e. exists in ontologies(). It sends a getTermByIdRequest SOAP message and retrieves and parses the getTermByIdResponse. The original interface is public String getTermById(String termId, String ontologyName).

Usage

term(termId, ontologyName)

Arguments

termId
A character with a valid ontology identifier.
ontologyName
A character with the name of a valid ontology name.

Value

A string with the description of that identifier, as found in ontolgy ontologies. If termId was not found in ontologies(), as warning is issued and NULL is returned.

See Also

Other ols-queries: allIds; isIdObsolete; olsQuery; olsVersion; ontologies; ontologyLoadDate; ontologyNames; rootId; termMetadata; termXrefs

Examples

Run this code
term("GO:0005794", "GO") ## valid description
term("GO:0000000", "GO") ## returns NULL
term("210797", "NEWT")

Run the code above in your browser using DataLab