While on the whole the conversion process between OBO and OWL (in either direction) is relatively good these days using Protege 4.1 (which makes use of the OWLAPI underneath), there were some manual changes required. This post describes all changes made to the automatically-generated EDAM OWL file prior to importing into SWO.
- Change the (initially anonymous) ontology URI to http://edamontology.org within the EDAM OWL file.
- Replace the erroneous URI created by the Protege conversion for DeprecatedClass to the correct OWL URI of http://www.w3.org/2002/07/owl#DeprecatedClass
- The conversion process also creates an incorrect “owl2” namespace for all attributes of properties (e.g. reflexive, transitive, see also the point directly above) as follows:
<!ENTITY owl2 “http://purl.obolibrary.org/obo/http_//purl.org/obo/owl:” >
This was fixed manually by removing the incorrect namespace and replacing all instances of “owl2” with “owl”. However, when the file is saved again in Protege, even though the owl2 namespace isn’t used at all any more, it is still re-created. It was likely due to the following lines in the OWL file, which have now had the incorrect string “http_//purl.org/obo/owl:” removed:
- Replaced incorrect URI for definition_editor with the correct one: http://www.ebi.ac.uk/efo/definition_editor).
- All of the inverse, range and domain statements are stored as annotations by default when the conversion process happens, rather than being stored as OWL descriptions. For cases such as this:
additional statements such as the following were added:
Nothing was deleted so that conversion back to OBO would be OK.
- The URI of all EDAM classes needed to be fixed after conversion from OBO, as the default URI for all classes is the purl.obolibrary.org-based URI. The global search and replaces performed are:
- Remove “obo” namespace, as these are all incorrect, and should instead be using the edam default namespace. In practice, this means deleting all instances of the strings “obo:” and “&obo;”, as well as the declaration of the associated namespace at the top of the file.
- Remove the string “EDAM_” from anywhere in the OWL file, as this is now unnecessary, and if it remains, then the URIs for the class names are incorrect.
- Separated out all modules (data (containing both data and format hierarchies), operation, topic), into their own files. These files are named edam_data.owl, edam_operations.owl, edam_obsoletes.owl and edam_topics.owl. While modularizing edam_obsoletes.owl, one leftover axiom was identified on one of the obsoleted classes. At Jon Ison’s request, I have deleted this axiom: Genotype and phenotype annotation format (an obsolete class) SubClassOf ‘is format of’ some Genotype/Phenotype annotation (not obsolete).
- An additional edam_core.owl file was made to easily view EDAM on its own and to store all cross-file / cross-module axioms. By storing cross-file axioms in the edam_core.owl, the individual module files are much cleaner. The edam_core.owl file is then imported into SWO. If in future we wish to move all cross-file axioms out of edam_core.owl, then this can be done, and the three module files could be imported directly.
- Import edam_core.owl into SWO. This simplistically-merged ontology reasons with no inconsistencies (although there are some interesting features of EDAM in OWL that Jon will want to take a look at, particularly the inference that Data and Operation are equivalent).