propagate_relations {ontologyIndex}R 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


[Package ontologyIndex version 2.12 Index]