althonos / pronto

A Python frontend to (Open Biomedical) Ontologies.
https://pronto.readthedocs.io
MIT License
226 stars 46 forks source link

Dump as OWL #149

Open cthoyt opened 2 years ago

cthoyt commented 2 years ago

Right now the Ontology.dump() function only supports OBO and OBO Graph JSON. It would be great if it could dump valid OWL (e.g. in RDF/XML) or another serialization of OWL that can be read by Protege

althonos commented 2 years ago

It's getting there, I have almost finalized the OBO to OWL mapping at the syntactic level in fastobo-owl, with that I will be able to provide OWL/XML and OWL/Functional serialization, and any other output format supported by horned-owl!

cthoyt commented 2 years ago

Excellent news! However the OWL python software ecosystem is basically turtles all the way down now... it would be great to have a reference implementation of everything in one package (would be great if it were yours). I guess you're involved in horned-owl though?

althonos commented 2 years ago

Well, horned-owl has some work going on regarding RDF formats with the rio_api, for now it's hardcoded to be used with an RDF/XML parser, but rio_api is generic so in theory you could get support for turtles with limited effort with rio-turtle. That's probably going to take longer though, for now I'll focus on getting the current formats into fastobo before adding new ones.

althonos commented 2 years ago

The end goal being to have the different implementations in different Rust crates, but then expose all of them in the fastobo-py package so they can be used in Python with fastobo.load_owl and fastobo.dump_owl, just like the OBO-graph format :)

althonos commented 2 years ago

Okay so you can now dump to OWL Functional in v2.4.4, I'll update when the horned-owl XML serializer is fixed to support OWL/XML, and then for the RDF-based formats we may have a bit of upstream work to do first.

serenalotreck commented 2 months ago

@althonos wanted to follow up to see what the status of this enhancement is. I'd like to turn an OBO ontology into OWL format; however, in both the docs and the source code, it looks like OWL Functional isn't supported (I have v2.5.5)