Learn R Programming

ontologyIndex (version 2.2)

get_term_descendancy_matrix: Get logical descendancy matrix for set of terms

Description

Get logical descendancy matrix for set of terms

Usage

get_term_descendancy_matrix(ontology, terms = NULL, rows = terms, cols = terms)

Arguments

ontology
ontology_index object.
terms
Character vector of ontological terms.
rows
Rows for resultant matrix (defaults to terms).
cols
Cols for resultant matrix (defaults to terms).

Value

A logical square matrix of with length(terms) columns and rows. result[row_term,col_term] == TRUE if row_term is an ancestor (and not the same as) of col_term.A logical matrix.

Examples

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

Run the code above in your browser using DataLab