Read ontology from OBO file into R
get_ontology(
file,
propagate_relationships = "is_a",
extract_tags = "minimal",
merge_equivalent_terms = TRUE
)get_OBO(
file,
propagate_relationships = "is_a",
extract_tags = "minimal",
merge_equivalent_terms = TRUE
)
ontology_index
object.
File path of OBO formatted file.
Character vector of relations
Character value: either "minimal" or "everything", determining whether to extract only the properties of terms which are required to run functions in the package - i.e. "id", "name", "parents", "children"
and "ancestors"
- or extract all properties provided in the file. Term properties are named in the resulting ontology_index
as their corresponding tags in the OBO file (except "parents"
, "children"
and "ancestors"
which are appended with "_OBO"
to avoid clashing with standard ontology_index
properties. Defaults to "minimal"
.
Logical value determining whether terms that are marked "equivalent_to"
a target term should be merged, retaining properties of the target term when the property should have one value, e.g. the term ID and name. Defaults to TRUE
.
get_relation_names