Ontobee Adapter
Documentation
- class oaklib.implementations.ontobee.ontobee_implementation.OntobeeImplementation(resource: ~oaklib.resource.OntologyResource = None, strict: bool = False, _multilingual: bool = None, autosave: bool = <factory>, exclude_owl_top_and_bottom: bool = <factory>, ontology_metamodel_mapper: ~oaklib.mappers.ontology_metadata_mapper.OntologyMetadataMapper | None = None, _converter: ~curies.api.Converter | None = None, auto_relax_axioms: bool = None, cache_lookups: bool = False, property_cache: ~oaklib.utilities.keyval_cache.KeyValCache = <factory>, _edge_index: ~oaklib.indexes.edge_index.EdgeIndex | None = None, _entailed_edge_index: ~oaklib.indexes.edge_index.EdgeIndex | None = None, _prefix_map: ~typing.Mapping[str, str] | None = None, sparql_wrapper: <module 'SPARQLWrapper' from '/home/runner/.cache/pypoetry/virtualenvs/oaklib-5bvmowLS-py3.9/lib/python3.9/site-packages/SPARQLWrapper/__init__.py'> = None, graph: ~rdflib.graph.Graph = None, _list_of_named_graphs: ~typing.List[str] = None, **_kwargs)[source]
An OAK adapter that standardizes access to the Ontobee sparql endpoint.
Ontobee is the default linked data server for most OBO Foundry library ontologies. Ontobee has also been used for many non-OBO ontologies.
To access this use the
ontobee:
Input Selector:ontobee:
- the default ontobee endpointontobee:uberon
- the uberon subgraph on ontobee
This adapter implements:
Note
To see the full range of methods implemented, see the documentation for the interfaces above.
An OntobeeImplementation can be initialized directly:
>>> from oaklib.implementations import OntobeeImplementation >>> oi = OntobeeImplementation()
The default ontobee endpoint will be assumed
Alternatively, use a selector:
>>> from oaklib import get_adapter >>> oi = get_adapter("ontobee:")
Or to access a specific ontology, such as the Vaccine Ontology:
>>> oi = get_adapter("ontobee:vo")
After that you can use any of the methods that OntoBee implements; e.g.
>>> from oaklib.datamodels.vocabulary import IS_A >>> # uncomment to test >>> # for a in oi.ancestors("UBERON:0002398", predicates=[IS_A]): >>> # print(a)
Command Line
$ runoak -i ontobee:uberon ancestors -p i UBERON:0002398
Notes
This is a specialization the sparql implementation to allow access for ontologies on the Ontobee linked data server.