get_term_descendancy_matrix: Get logical descendancy matrix for set of terms

View source: R/sets.R

get_term_descendancy_matrixR Documentation

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

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

ontologyIndex documentation built on May 31, 2023, 5:58 p.m.