ontoneo-project / Ontoneo

Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

Import only selected subsets of other ontologies #14

Closed jamesaoverton closed 7 years ago

jamesaoverton commented 7 years ago

The import directory contains a number of subsets from other ontologies, which is good practise. However the main ontoneo.owl file is importing the full versions of those ontologies, not the subsets.

One solution is to have a partial entry in your PURL configuration that will redirect a directory of files. Here is an example from DOID: https://github.com/OBOFoundry/purl.obolibrary.org/blob/master/config/doid.yml In their OWL file they use those PURLs to redirect http://purl.obolibrary.org/obo/doid/imports/uberon_import.owl to their subsets in GitHub.

To make these imports work when doing local development, they use a catalog file that tells Protege to use the local versions. See the first several lines of this file: https://github.com/DiseaseOntology/HumanDiseaseOntology/blob/master/src/ontology/catalog-v001.xml

I wish this was easier, but it's the best way to get the behaviour that (I think) you want.

FernandaFarinelli commented 7 years ago

I fixed it following these instructions. Let me know if it is ok. Thank you for help me.

jamesaoverton commented 7 years ago

One more change and this will be right. It's important for file names to match exactly. For example, the name should be UBERON_import.owl everywhere: the real file name, the owl:import Element in ontoneo.owl, and the entries in the catalog-v001.xml file. Right now there's a mixture of lowercase (uberon_import.owl) and uppercase (UBERON_import.owl) that will cause problems.

The catalog file will tell Protege (and other tools) where to find the import files when people are using a checkout of this repository. I've updated the PURL pull request with a prefix entry that will tell Protege (and other tools) where to find the import files on the network.

This is the best and simplest method that I know of. I wish it was simpler.

FernandaFarinelli commented 7 years ago

Thank you, #jamesaoverton.

I update every import file name to lowercase.

FernandaFarinelli commented 7 years ago

I replace the repository files to be with lowercase name. Is it ok now?

jamesaoverton commented 7 years ago

Yes, this should work. Thanks!