I have an obo file that includes an import to a foodon extract. Note that it's conventional for ontologies to always state imports to the .owl, even in the .obo format version, so without a mechanism like catalog-v001.xml to redirect imports, pronto always follows the import and tries to parse the rdf/xml. This results in an error
The issue is with the datatype declaration. I believe this is valid OWL (https://www.w3.org/TR/owl2-syntax/), although it's conventional to drop this as it's implicit.
Stack trace:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pronto/ontology.py", line 283, in __init__
cls(self).parse_from(_handle) # type: ignore
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pronto/parsers/rdfxml.py", line 117, in parse_from
self._extract_term(class_, curies)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pronto/parsers/rdfxml.py", line 446, in _extract_term
termdata.annotations.add(self._extract_literal_pv(child))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pronto/parsers/rdfxml.py", line 236, in _extract_literal_pv
property, typing.cast(str, elem.text), self._compact_datatype(datatype)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pronto/parsers/rdfxml.py", line 182, in _compact_datatype
raise ValueError(f"invalid datatype: {iri!r}")
ValueError: invalid datatype: 'http://www.w3.org/2000/01/rdf-schema#Literal'
debugging mondo parsing with @hrshdhgd
I have an obo file that includes an import to a foodon extract. Note that it's conventional for ontologies to always state imports to the .owl, even in the .obo format version, so without a mechanism like catalog-v001.xml to redirect imports, pronto always follows the import and tries to parse the rdf/xml. This results in an error
This can be reproduced with a smaller example:
The issue is with the datatype declaration. I believe this is valid OWL (https://www.w3.org/TR/owl2-syntax/), although it's conventional to drop this as it's implicit.
Stack trace: