Obo-Owl RESTful Conversion API

url Example: http://www.ifomis.org/bfo/1.0#

convert to format

follow imports closure (owl->obo only)?

manifest names from URIs (owl->obo only)?

metadata style (conversion to owl only)

cache refresh time seconds

please be patient. click only once (see notes on caching, below)

How to construct a conversion URL

Suppose there is an OWL ontology you wish to use in an OBO application - for example http://ccdb.ucsd.edu/SAO/1.2/SAO.owl. You can construct a stable URL that points at the syntactic OBO equivalent using the following scheme

 OBO-CONVERTER-BASE-URL '?' 'url=' httpEscape(ONTOLOGY-DOWNLOAD-URL) '&' 'format=' FORMAT

For example, for the SAO this would be:

http://www.berkeleybop.org/obo-conv.cgi?url=http%3A%2F%2Fccdb.ucsd.edu%2FSAO%2F1.2%2FSAO.owl&format=obo

You can use this URL in most places where you can use an OBO filename (e.g. in the load ontology interface in oboedit)

For the conversion to OWL, you can give the converter hints as to what to do with metadata properties (synonyms etc):

 '&' 'style=' STYLE

The SAO uses SAO metadata tags (AnnotationProperties), so this would be:

http://www.berkeleybop.org/obo-conv.cgi?url=http%3A%2F%2Fccdb.ucsd.edu%2FSAO%2F1.2%2FSAO.owl&format=obo&style=sao

Note that styles have to be coded in advance, and they are often brittle (eg may only work with a particular version of the ontology)

TODO: combining styles

Note you can use this URL in most places where you can use an OBO filename. For example, in oboedit or obo2obo:

obo2obo -o sao.obo 'http://www.berkeleybop.org/obo-conv.cgi?url=http%3A%2F%2Fccdb.ucsd.edu%2FSAO%2F1.2%2FSAO.owl&format=obo.&style=sao'

Imports

If the owl file has imports directives, these should all be followed up-front. Use the follow_imports=1 http tag for this

OBO to OWL

A transform from obo to owl (somewhat slower), for example on the obo cell ontology:

http://www.berkeleybop.org/obo-conv.cgi?url=http%3A%2F%2Fwww.berkeleybop.org%2Fontologies%2Fobo-all%2Fcell%2Fcell.obo&format=owl

The style option currently has no effect in this direction (there is only one style - OboInOwl)

Caching

The converter uses two caches - the first caches the contents of the remote URL. If a copy exists in the cache which is <1 hr old, it will use this. To override, pass a parameter

 '&refresh_time=' 'SECONDS'
set this to zero to always download the remote URL into the cache

The second caches the results of the conversion. This is keyed on the byte-level contents of the remote URL. If the remote ontology changes only by a single byte, the conversion is redone from scratch

If you convert the same URL using multiple styles, a separate cache would be kept for each style

If the conversion you want has already been performed in the last hour, you should get back results instantly. If the conversion has been performed already on the exact same remote ontology but over an hour ago, there will be additional lag whilst this service downloads the remote ontology and checks the byte sequence (using MD5). If the remote ontology has changed, a re-conversion will be performed - but only once.

Some ontologies, such as the NCI Thesaurus will take some time to convert. You may also wish to check the pre-converted static files at The OBO Foundry

How this works

The source for this API can be found in A simple CGI script in the obo cvs repository

the obo2owl xslt is used for the obo to owl direction; the experimental blip/swi-prolog converter is used for owl to obo

Troubleshooting

if for some reason an incorrect translations gets cached, you can add the parameter retranslate=1

if that fails, then email cjm AT berkeleybop DOT org

See Also

The Manchester OWL Syntax convert handles OBO::

http://owl.cs.manchester.ac.uk/converter