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_entities2
will
use basilisk to acquire owlready2 python modules that parse the OWL and
produce an ontology_index
instance (defined in CRAN package
ontologyIndex).
library(ontoProc)
clont_path = owl2cache(url="http://purl.obolibrary.org/obo/cl.owl")
cle = setup_entities2(clont_path)
cle
## Ontology with 16430 terms
##
## Properties:
## id: character
## name: character
## parents: list
## children: list
## ancestors: list
## obsolete: logical
## Roots:
## BFO_0000003 - occurrent
## BFO_0000002 - continuant
## CL_0000000 - cell
## GO_0050878 - regulation of body fluid levels
## CHEBI_25905 - peptide hormone
## GO_0010817 - regulation of hormone levels
## CHEBI_33696 - nucleic acid
## CHEBI_18085 - glycosaminoglycan
## CHEBI_33694 - biomacromolecule
## CHEBI_51143 - nitrogen molecular entity
## ... 317 more
The usual plotting approach works.
We’ll obtain and ad hoc selection of 15 UBERON term names and visualize the hierarchy.
hpont_path = owl2cache(url="http://purl.obolibrary.org/obo/hp.owl")
hpents = setup_entities2(hpont_path)
kp = grep("UBER", names(hpents$name), value=TRUE)[21:30]
onto_plot2(hpents, kp)
The prefixes of class names in the ontology give a sense of its scope.
##
## [,1]
## BFO 11
## CHEBI 1849
## CL 1151
## GO 2563
## HP 19434
## HsapDv 12
## MPATH 75
## NBO 64
## PATO 567
## PR 206
## RO 1
## UBERON 5605
To characterize human phenotypes ontologically, CL, GO, CHEBI, and UBERON play significant roles.