Learn R Programming

ontologyIndex (version 2.2)

get_OBO: Read ontology from OBO file into R

Description

Read ontology from OBO file into R

Usage

get_OBO(file, term_regexp = "^\\[(Term|Typedef)\\]", id = "^id: ([^ !]+).*", name = "^name: (\\.*)", parents = c("^is_a: ([^ !]+).*", "list"), obsolete = c("^is_obsolete: (true)", "logical"), remove_missing = FALSE, ...)

Arguments

file
File path of obo file.
term_regexp
Regular expression for which designates the beginning of the specification of a new term in the OBO file. See grep for details on formatting the expression.
id
Regular expression for matching term IDs.
name
Regular expression for matching human readable term labels.
parents
Regular expression for matching against parents for each term.
obsolete
Regular expression for extracting whether terms are obsolete.
remove_missing
Logical value determining whether the parents in parent-child relationships in the ontology should be removed from the index. If there are parents which are missing, failure to remove them will lead to an error.
...
Additional functions for extracting properties of individual nodes. Arguments should be named (such that the name of the argument becomes the name of the slot in the resulting ontology_index object), and character vectors of length 1 or 2: the first element being a regular expression, the second specifying the "mode" of the array to become the property in the returned index (see the "mode" argument of vector for more details).

Value

ontology_index object.