propagate_relations: Select terms by propagating relations from a set of terms

View source: R/sets.R

propagate_relationsR Documentation

Select terms by propagating relations from a set of terms

Description

An 'ontology_index' can contain multiple relations (for example in the case of the Gene Ontology, "is_a" and "part_of" could be stored as separate properties in an ‘ontology_index'). Transitive relations (i.e. relations such that x related to y and y related to z implies x related to z, for example the relation ’is an ancestor of') stored by an ‘ontology_index' can be propagated using this function. The ’inverse relations' (i.e. x inversely related to y if y related to x) can also be propagated by setting the use_inverse_relations parameter to TRUE.

Usage

propagate_relations(
  ontology,
  roots,
  relations,
  use_inverse_relations = FALSE,
  exclude_roots = FALSE
)

Arguments

ontology

ontology_index object.

roots

Character vector of term IDs from which relations will be propagated.

relations

Character vector given names of transitive relations to be propagated.

use_inverse_relations

Boolean vector indicating whether to propagate inverse relations. If use_inverse_relations is the same length as relations, each element determines whether the corresponding relation in relations is inverted.

exclude_roots

Boolean determining whether to remove the given roots terms from the result.

Value

Character vector of terms

See Also

get_ancestors, get_descendants


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