efo
efo copied to clipboard
Pronto cannot read EFO 3.67.0
Attempting to parse EFO 3.67.0 from http://www.ebi.ac.uk/efo/releases/v3.67.0/efo.owl using Pronto, which is the defacto standard in Python, results in an error.
Note that all past versions including 3.66.0 still work.
---> 50 onto = Ontology("efo.3.67.0.owl")
File ~/PycharmProjects/bionty/bionty/base/_ontology.py:33, in Ontology.__init__(self, handle, import_depth, timeout, threads, prefix)
31 self._prefix = prefix
32 warnings.filterwarnings(\"ignore\", category=pronto.warnings.ProntoWarning)
---> 33 super().__init__(
34 handle=handle, import_depth=import_depth, timeout=timeout, threads=threads
35 )
File ~/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/ontology.py:283, in Ontology.__init__(self, handle, import_depth, timeout, threads)
281 for cls in BaseParser.__subclasses__():
282 if cls.can_parse(typing.cast(str, self.path), buffer):
--> 283 cls(self).parse_from(_handle) # type: ignore
284 break
285 else:
File ~/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py:117, in RdfXMLParser.parse_from(self, handle, threads)
115 self._extract_annotation_property(prop, curies)
116 for class_ in tree.iterfind(_NS[\"owl\"][\"Class\"]):
--> 117 self._extract_term(class_, curies)
118 for axiom in tree.iterfind(_NS[\"owl\"][\"Axiom\"]):
119 self._process_axiom(axiom, curies)
File ~/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py:399, in RdfXMLParser._extract_term(self, elem, curies)
397 termdata.xrefs.add(Xref(text))
398 else:
--> 399 termdata.xrefs.add(Xref(attrib[_NS[\"rdf\"][\"resource\"]]))
400 except ValueError:
401 pass
KeyError: '{http://www.w3.org/1999/02/22-rdf-syntax-ns#}resource'"
}