Learn R Programming

hpoPlot (version 1.0)

get.ancestors: Get ancestor terms of term set

Description

Recursive function to find all the terms from which a term in the given set descends.

Usage

get.ancestors(hpo.terms, target.terms)

Arguments

hpo.terms
An R-Object representing the HPO, as returned by get.hpo.terms.
target.terms
Character vector of HPO terms.

Value

  • Character vector of HPO terms which are ancestors to at least one of the `target.terms'

Examples

Run this code
data(hpo)
	example.ancestors <- get.ancestors(hpo.terms, "HP:0002076")
	print(hpo.terms$name[example.ancestors])

Run the code above in your browser using DataLab