Learn R Programming

ontologyIndex (version 2.12)

get_ancestors: Get set of terms containing all ancestors of terms in a given set

Description

Get set of terms containing all ancestors of terms in a given set

Usage

get_ancestors(ontology, terms)

Value

Character vector of all terms which are an ancestor of at least one term in terms, including the terms themselves

Arguments

ontology

ontology_index object.

terms

Character vector of ontological terms.

See Also

link{get_descendants}

Examples

Run this code
data(hpo)
get_ancestors(hpo, c("HP:0001873", "HP:0011877"))

Run the code above in your browser using DataLab