Ontology Adapter Selectors

In the command line interface and in Python code, descriptors can be used as a shorthand way to refer to either a local or remote ontology, plus a method for parsing/querying it. The OntologyResource that is returned can be used to instantiate an implementation. The descriptors can also be used in the CLI

Note

Ontologies are available in a sometimes bewildering range of formats. One thing that constantly trips people up is the distinction between ontology language and serialization. OWL is an ontology language, not a syntax. OWL has its own syntaxes such as Manchester Syntax, OWL-XML and Functional Syntax’ – additionally it can be *mapped* to RDF, which is its *own* datamodel/language, with its *own* serializations (:term:`Turtle, RDF/XML (NOT the same as OWL-XML), JSON-LD, …). Confusing, huh? We are doing our best in this library to simplify things for you the user, please be patient!

Syntax

A descriptor is EITHER:

  • prefixed with a scheme OR

  • is a *path (in which case the scheme is inferred)

Examples

Examples of scheme-less descriptors, implicit implementation:

  • tests/input/go-nucleus.obo - local OBO Format file loaded with pronto

  • tests/input/go-nucleus.json - local OBO Graphs json format file loaded with pronto

  • tests/input/go-nucleus.owl - local OWL rdf/xml format file (loaded with rdflib at the moment, may change)

  • tests/input/go-nucleus.owl.ttl - local OWL Turtle file (loaded with rdflib at the moment, may change)

  • tests/input/go-nucleus.db - local sqlite3 db loaded with SqlImplementation

  • http://purl.obolibrary.org/obo/pato.obo - NOT IMPLEMENTED; download locally for now

  • http://purl.obolibrary.org/obo/pato.owl - NOT IMPLEMENTED; download locally for now

Examples of explicit schemes:

  • sparql:tests/input/go-nucleus.owl.ttl - local OWL file in turtle serialization

  • sparql:tests/input/go-nucleus.owl - local OWL file (RDF/XML assumed unless explicit format option passed)

  • pronto:tests/input/go-nucleus.obo - local OBO Format file loaded with pronto

  • pronto:tests/input/go-nucleus.json - local OBO Graphs json format file loaded with pronto

  • pronto:tests/input/go-nucleus.owl - local OWL rdf/xml format file (loaded with pronto at the moment may change)

  • pronto:tests/input/go-nucleus.db - local sqlite3 db loaded with SqlImplementation

  • prontolib:pato.obo - remote OBO Format file loaded from OBO Library with pronto

  • prontolib:pato.owl - remote owl format file loaded from OBO Library with pronto

  • sqlite:tests/input/go-nucleus.db - local SQLite file

  • sqlite:tests/input/go-nucleus.owl - convert OWL to SQLite and query using sql_implementation

  • sqlite:obo:go - pre-made SQLite from Semantic SQL registry

  • bioportal: all of bioportal

  • bioportal:pato pato in bioportal

  • ontobee: all of ontobee

  • ontobee:pato pato in ontobee

  • ols: all of OLS

  • ols:pato pato in OLS (NOT IMPLEMENTED)

  • ubergraph: all of OLS

  • ubergraph:pato pato in ubergraph

See CLI for more examples

Schemes

pronto

Implementation: Pronto / OBO Files Adapter

The slug is a path to a file on disk. Must be in obo or owl or json

prontolib

Implementation: Pronto / OBO Files Adapter

The slug is the name of the resource on obo, e.g. pato.obo, cl.owl

sqlite

Implementation: SQL Database Adapter

The slug is the path to the sqlite .db file on local disk

obosqlite

Implementation: SQL Database Adapter

The slug is the name of the ontology, e.g ‘hp’, ‘uberon’

TODO: download from s3

ontobee

Implementation: Ontobee Adapter

Currently the slug is ignored

ols

Implementation: Ontology Lookup Service (OLS) Adapter

Currently the slug is ignored

bioportal

Implementation: Bioportal Adapter

Currently the slug is ignored

funowl

Implementation: FunOwl Adapter

NOT IMPLEMENTED YET

Functions