vignettes/owlents.Rmd
owlents.Rmd
In Bioconductor 3.19, ontoProc can work with OWL RDF/XML serializations of ontologies, via the owlready2 python modules.
The owl2cache
function retrieves OWL from a URL or file and places it in a cache to avoid repetitious retrievals. The default cache is the one defined by BiocFileCache::BiocFileCache()
. Here we work with the cell ontology. setup_entities
will use owlready2 python modules to parse the OWL and produce an instance of S3 class owlents
.
library(ontoProc)
clont_path = owl2cache(url="http://purl.obolibrary.org/obo/cl.owl")
cle = setup_entities(clont_path)
cle
## owlents instance with 16147 classes.
A plot method is available. Given a vector of tags as reported in OWL (no colons are used), the plot method produces an ontologyIndex instance and runs onto_plot2 on the result.
hpont_path = owl2cache(url="http://purl.obolibrary.org/obo/hp.owl")
## resource BFC63 already in cache from http://purl.obolibrary.org/obo/hp.owl
hpents = setup_entities(hpont_path)
plot(hpents, hpents$clnames[550:570])
Note that an attempt to plot with tail(hpents$clnames)
failed in November 2023, as the parents of those classes could not be found in HPO at that time. This could be evidence of an upstream error.