Option to cache ontologies
- Vorherrschende Sprache
- Python
- Sterne
- 267
- Forks
- 48
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I've been debugging the [CHIRO (CHEBI Integrated Role Ontology)](http://www.obofoundry.org/ontology/chiro.html) OBO export, and it had a few issues. First, I had to manually add some `Typedef` stanzas for its ad-hoc relations. Second, I had to switch the imports from its slimmed versions to the originals since the slim versions were missing several entities.
This lead me to the problem that it has to download each ontology file each time, and this takes a loooong time. Therefore, I'd like to request an option to cache OBO files (either the source .obo or a pre-compiled version as a pickle or OBO JSON)
I understand there could be problems to keeping the caches up-to-date, but maybe there's a simple way to add a dictionary argument to `Ontology.__init__` so I can specify where I have my own copies like
```python
from pronto import Ontology
Ontology.from_obo_library('chiro.obo', cache_files={
'http://purl.obolibrary.org/obo/chiro/imports/chebi_import.owl': '/Users/cthoyt/obo/chebi.owl',
'http://purl.obolibrary.org/obo/chiro/imports/envo_import.owl' : '/Users/cthoyt/obo/envo.owl',
...
})
```
Or alternatively, maybe you have an idea that could take care of this kind of caching for me so I don't have to look into the imports of the OBO file specifically.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.