Dead Simple OWL Design Patterns David Osumi-Sutherland, Melanie Courtot, James P. Balhoff and Christopher Mungall Journal of Biomedical Semantics 2017 8:18 DOI:10.1186/s13326-017-0126-0
The job of editing the GO and many other OBOish OWL ontologies increasingly involves specifying OWL design patterns. We need a simple, light-weight standard for specifying these design patterns that can then be used for generating documentation, generating new terms and retrofitting old ones. The solution must be readable and editable by anyone with a basic knowledge of OWL and the ability to read manchester syntax. It must also be easy to use programatically without the need for custom parsers - i.e. it should follow some existing data exchange standard.
Human readability and editability requires that Manchester syntax be written using labels, but sustainability and consistency checking requires that the pattern record IDs.
-
Patterns are specified in the subset of YAML that can be converted to JSON.
- JSON format is the ideal exchange format for programatic consumption: It is already javascript; Standard libraries are available to convert it into datastructures in many languages;Developers are typically experienced at consuming it.
- But YAML is much easier than JSON for humans to edit (it can be difficult for human editors to keep curly braces and quotes balanced and to add commas correctly in JSON). YAML also has the great advantage over JSON of allowing comments to be embedded. Conversion between YAML and JSON is trivial
-
All patterns contain dictionaries (hash lookups) that can be used to lookup up OWL shortform IDs from labels. OWL ShortFormIDs are assumed to be sufficient for entity resolution during usage of the pattern. Labels are assumed to be sufficient for entity resolution within a pattern.
-
Variable interpolation into Manchester syntax and text is specified using printf format strings. Variable names are stored in associated lists.
-
Variables are specified in a dictionary with variable name as key and value as range specified as a Manchester syntax expresssion.
JSON schema specification in YAML.
The same specification rendered in mardown, with references resolved. This is generated from the original spec using the dosdp document
command (see below for details).
pip install dosdp
See https://pypi.org/project/dosdp/
The aim of this project is to specify a simple design pattern system that can easily be consumed, whatever your code base. This repository includes a simple Python validator (src/simple_pattern_tester.py).
For implementation, we recommend dosdp-tools.