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"
# [1] "GO:0000001" "GO:0000003"
ontology_name_id(c('GO:0000001', 'reproduction'), ids = FALSE)
#> [1] "mitochondrion inheritance" "reproduction"
# [1] "mitochondrion inheritance" "reproduction"