ontology_name_id: Translate between ontology IDs and names

ontology_name_idR Documentation

Translate between ontology IDs and names

Description

Makes sure that the output contains only valid IDs or term names. The input can be a mixture of IDs and names. The order of the input won't be preserved in the output.

Usage

ontology_name_id(terms, ids = TRUE, db_key = "go_basic")

Arguments

terms

Character: ontology IDs or term names.

ids

Logical: the output should contain IDs or term names.

db_key

Character: key to identify the ontology database. For the available keys see omnipath_show_db.

Value

Character vector of ontology IDs or term names.

Examples

ontology_name_id(c('mitochondrion inheritance', 'reproduction'))
# [1] "GO:0000001" "GO:0000003"
ontology_name_id(c('GO:0000001', 'reproduction'), ids = FALSE)
# [1] "mitochondrion inheritance" "reproduction"


saezlab/OmnipathR documentation built on May 3, 2024, 5:32 a.m.