Finds the term matching the query text, and returns its IRI. If the query text is already a IRI, it is returned as is.

get_term_iri(text, as, exactOnly = FALSE, nomatch = NA, verbose = FALSE)

Arguments

text

character. The search text to be resolved.

as

character. The ontology or ontologies as which to find the term. Can be provided in several ways: (1) IRI of the ontology; (2) the ID space for OBO ontologies such as UBERON, VTO, etc; (3) "anatomy" and "taxon" as shorthand for all anatomy and taxon ontologies, respectively; (4) NA to disable any filtering by defining ontology. Options (1) and (2) can be combined. There is no default.

exactOnly

logical. Whether to require an exact match. If TRUE, only the first exact match is returned. Default is FALSE.

nomatch

the value to return if there is no match, by default NA.

verbose

logical: optional. If TRUE, prints messages prior to potentially time-consuming operations. Default is FALSE.

Value

The IRI if a match is found.

Details

This uses find_term to find matches, and assumes that the term of interest is a class. If there is an exact match, its IRI will be returned. If there isn't, by default partial, and as a last resort broad, matches will also be considered, although this will result in a warning.