get_ont_level: Get HPO term ontology level

Description Usage Arguments Details Examples

View source: R/get_ont_level.R

Description

In this function, ontology level refers to the number of generations of sub-phenotypes a term has below it in the HPO DAG. For example, the root of the HPO is term "HP:0000001", the longest path to a term with no child terms is 14. In otherwords there are 14 generations of "is-a" relationships below HP:0000001 and it is therefore at ontology level 14. A term with no sub-phenotypes below it (a leaf node), is at ontology level 0.

Usage

1
get_ont_level(hpo, term_ids)

Arguments

hpo

The Human phenotype ontology data object, available in ontologyIndex package <list>

term_ids

A HPO Id (e.g. "HP:0000001") or a vector of multiple Ids <string> or <vector<string>>

Details

Typically this function should be used to get the level of a single term, but you can supply a vector of multiple terms and it will return the level of the highest level term in that vector.

Examples

1
2
3
4
5
## Not run: 
term_ids <- "HP:0000001"
get_ont_level(hpo,term_ids)

## End(Not run)

ovrhuman/HPOExplorer documentation built on Dec. 22, 2021, 5:21 a.m.