get_term_descendancy_matrix: Get logical descendancy matrix for set of terms

Description Usage Arguments Value Examples

View source: R/sets.R

Description

Get logical descendancy matrix for set of terms

Usage

1
2
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

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

oganm/ontologyIndexOgfork documentation built on Oct. 11, 2019, 2:53 a.m.