relations_list_to_table | R Documentation |
Converting the nested list to a table is a more costly operation, it takes
a few seconds. Best to do it only once, or pass tables = TRUE
to
obo_parser
, and convert the data frame to list, if you
also need it in list format.
relations_list_to_table(relations, direction = NULL)
relations |
A nested list of ontology relations (the "relations"
element of the list returned by |
direction |
Override the direction (i.e. child -> parents or parent -> children). The nested lists produced by functions in the current package add an attribute "direction" thus no need to pass this value. If the attribute and the argument are both missing, the column will be named simply "side2" and it won't be clear whether the relations point from "term" to "side2" or the other way around. The direction should be a character vector of length 2 with the values "parents" and "children". |
The relations converted to a data frame (tibble).
swap_relations
relations_table_to_list
obo_parser
goslim_url <-
"http://current.geneontology.org/ontology/subsets/goslim_generic.obo"
path <- tempfile()
httr::GET(goslim_url, httr::write_disk(path, overwrite = TRUE))
obo <- obo_parser(path, tables = FALSE)
unlink(path)
rel_tbl <- relations_list_to_table(obo$relations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.