Get the descendants of a set of ontology terms.

get_ontology_descendants(ont, terms, include_self = TRUE, ...)

Arguments

ont

An ontology of class ontology_DAG.

terms

A vector of ontology term IDs.

include_self

For dag_offspring() and dag_ancestors(), this controls whether to also include the query term itself.

...

Additional arguments passed to simona::dag_offspring.

Value

A named list of descendants, where the names are the input terms.

Examples

ont <- get_ontology("hp", terms=10)
#> Using cached ontology file (1/1):
#>  /github/home/.cache/R/KGExplorer/ontologies/github/hp_v2025-11-24.rds
#> Randomly sampling 10 term(s).
d <- get_ontology_descendants(ont, c("HP:0000001","HP:0000002"))
#> Translating ontology terms to ids.
#> Translating ontology terms to ids.
#> WARNING: The term HP:0000002 was not found in the ontology.