FAQ: General

What is OAK?

OAK is for both technical and non-technical users of ontologies. Non-technical users can use the CLI to query ontologies in a variety of ways. Technical users can write Python code that uses the OAK library to perform ontology-related tasks, ranging from basic lookup, search, graph traversals, validation, data annotation, mapping, and OWL processing.

Are there any tutorials for OAK?

Yes! There are a few sources:

Are there runnable examples of how to use OAK?

There are three main sources of examples:

I am familiar with both Python and Ontologies. Where should I start?

See the list of all methods in all interfaces, in the package documentation:

I find ontologies confusing. Is there a general guide to help me?

Yes! See the The OAK Guide.

Why is it called OAK?

OAK stands for the Ontology Access Kit. The name was chosen to mirror a companion package, the Ontology Development Kit (ODK), and also as a homage to Oakland, where some of the OAK developers are based.

How do I install OAK?

See Part 1: Getting Started of the tutorial.

Can I use OAK if I don’t know Python?

OAK provides a fully-featured command line interface. See Part 1: Getting Started of the tutorial.

Once you have installed OAK (see above), you can use the command runoak to run any of a large number of subcommands.

To get a full list, see:

runoak --help

Typically you use OAK in combination with an ontology from some source, specified with a selector, for example:

runoak -i sqlite:obo:hp COMMAND OPTIONS... ARGUMENTS...

Can I contribute to OAK?

Please consult the CONTRIBUTING.md guide

Is OAK just for bio-ontologies?

No, OAK can be used for any ontology, provided certain minimal conventions are followed:

  • the ontology should be available in a standard format like OWL (OR: should be available in a portal such as an OntoPortal portal)

  • if the ontology uses non-standard properties for Annotations, a mapping should be provided

Can OAK access ontologies in ontology portals such as MatPortal or BioPortal?

Yes, OAK has a number of Adapters that can “talk to” a remote endpoint provided that endpoint speaks a standard API such as the OntoPortal alliance API or the OLS API.


Note that not all OAK operations are supported for all endpoints. Some would be too expensive to do via API calls.

Endpoints such as the BioPortal API or the OLS excel in particular at tasks such as Text Annotation, where it is possible to run a text against a large bank of ontologies without having to download any locally.

For example, on the command line:

runoak -i bioportal: annotate "the quick brown fox"

Can OAK access ontologies in triplestores such as OntoBee or Ubergraph?

Yes, see:

Note that different triplestores will have different selections of ontologies loaded, and the loads may not be synchronized, so results may differ.

Additionally, each triplestore has different capabilities (e.g. full text search), and may store ontologies differently. For example, Ubergraph stores the full Relation Graph closure, which is particularly convenient for OAK graph operations. Some graph operations involving ancestry over arbitrary sets of predicates may not be possible on other triplestores.

Can OAK access local files?

Yes. The main use case for OAK is accessing an ontology or ontologies serialized in some standard format and stored locally on disk.

Can OAK access OBO Format files?

Yes. There are currently two adapters for working with OBO Format:

Currently pronto is the default. It is fast and implements the complete OBO Format specification. However, it can be very rigorous in enforcing syntactic rules, and as a result some ontologies will not load.

Does OAK support all of OWL?

Currently supporting all of OWL is out of scope for OAK. However, this should not be a major blocker for most intended uses of OAK, as an application library.

The main application of OWL is for constructing and maintaining ontologies - after an ontology is released, only a small subset of OWL constructs are typically used (e.g SubClassOf, SomeValuesFrom, Annotations).

There are a variety of ways of consuming OWL in OAK

  • The recommended way is to use SQL Database Adapter, which works off of RDF/OWL compiled to sqlite3

  • You can also use FunOwl Adapter, but this requires the ontology is in Functional Syntax

  • You can use a local or remote OWL ontologies serialized as RDF via the sparql_implementation

  • Using a tool like ROBOT to convert an OWL ontology to a serialization like OBO Format

Note that in future it is likely that OAK will support a wider range of OWL constructs

Does OAK support reasoning?

Currently OAK does not have access to Reasoning. But note that this is often not a limitation.

There is an experimental ROBOT plugin that can be used to interface with an OWL reasoner via ROBOT.

We also have plans to interface with Rust reasoners such as Whelk.

Can I use OAK to do graph queries over ontologies?

On the command line you can use the commands ancestors, tree, viz, all of which are variants of fetching and displaying ancestors.

Can I use OAK as a text annotator?

Yes. See the Text Annotator Interface.