INCATools / semantic-sql

SQL and SQLite builds of OWL ontologies
https://incatools.github.io/semantic-sql/
BSD 3-Clause "New" or "Revised" License
37 stars 3 forks source link

Weird offset in picking prefixes #71

Closed matentzn closed 1 year ago

matentzn commented 1 year ago

Given http://purl.obolibrary.org/obo/xao.owl

turned into sql like:

xao.db: xao.owl
    @rm -f .template.db
    @rm -f .template.db.tmp
    RUST_BACKTRACE=full semsql make $@
    @rm -f .template.db
    @rm -f .template.db.tmp

The wrong prefixes are assigned.

For example:

runoak -i sqlite:ontologies/xao.db terms 
ZFA:0005234 ! small secretory cell
ZFA:0005235 ! dorsal telencephalon
...

It should be:

XAO:0005234 ! small secretory cell
XAO:0005235 ! dorsal telencephalon

This is a pretty dangerous error and should be prioritised above everything else.

cc @hrshdhgd

matentzn commented 1 year ago

I noticed that given a prefix map, the next prefix in line is picked. I am assuming this is an issue with an index access on the prefix map.

semsql should be using the curies module for this!

hrshdhgd commented 1 year ago

Solved by https://github.com/INCATools/ontology-development-kit/pull/833

The ODK Docker image was published with an old version of semsql. After the PR linked above and after confirming via GH Actions, the latest version of semsql should be shipped via docker and the mangled prefixes should not exist.