Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import gene ontology #165

Closed
manulera opened this issue Apr 27, 2022 · 3 comments
Closed

Cannot import gene ontology #165

manulera opened this issue Apr 27, 2022 · 3 comments
Labels
question A question about the library.

Comments

@manulera
Copy link

manulera commented Apr 27, 2022

Hello,

Fairly new to using this library and ontologies in general, but I have tried it with an ontology so far, and it has worked very well.

However, I tried to start working with a second ontology (Gene Ontology, known as GO) and I don't manage to load it. I can load this ontology in protege, but the library gives me a key error for a term is there ('KeyError: 'GO:0000009')

This is the call that gives the error:

import pronto
ontology = pronto.Ontology('https://github.com/geneontology/go-ontology/raw/master/src/ontology/go-edit.obo')

Any advice on how get it to work? I suspect the problem likely has to do with the web imports.

The full error in this foldable below ``` Launching subshell in virtual environment... . /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/bin/activate (base) manu@eduroam-int-dhcp-97-199-236 StreamlineObo % . /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/bin/activate (StreamlineObo) (base) manu@eduroam-int-dhcp-97-199-236 StreamlineObo % python try_opening_go.py /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: NotImplementedWarning: cannot process plain `owl:AnnotationProperty` cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:286: SyntaxWarning: contains text but no `xsd:datatype` meta.annotations.add(self._extract_literal_pv(child)) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:286: SyntaxWarning: contains text but no `xsd:datatype` meta.annotations.add(self._extract_literal_pv(child)) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: unknown element in `owl:Class`: {http://www.w3.org/2002/07/owl#}equivalentClass self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: SyntaxWarning: could not find axiom source: 'NCBITaxon:117571' cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: SyntaxWarning: could not find axiom source: 'NCBITaxon:Union_0000005' cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: could not extract target IRI from `owl:Restriction` self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: cannot process `rdfs:subClassOf` in this context self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: several names found for 'OBA:1000076', using 'attribute of cell' self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: several names found for 'OBA:1000078', using 'attribute of organelle' self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: could not extract ID from `IAO:0100001` annotation self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:117: SyntaxWarning: `owl:disjointWith` element without `rdf:resource` self._extract_term(class_, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: SyntaxWarning: unknown axiom property: 'http://www.w3.org/2002/07/owl#disjointWith' cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: SyntaxWarning: unknown axiom property: 'http://www.w3.org/2000/01/rdf-schema#subClassOf' cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py:283: SyntaxWarning: unknown axiom property: 'http://purl.obolibrary.org/obo/RO_0002161' cls(self).parse_from(_handle) # type: ignore /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) /Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/rdfxml.py:113: SyntaxWarning: unknown element in `owl:ObjectProperty`: self._extract_object_property(prop, curies) Traceback (most recent call last): File "/Users/manu/Documents/Projects/StreamlineObo/try_opening_go.py", line 2, in ontology = pronto.Ontology('https://github.com/geneontology/go-ontology/raw/master/src/ontology/go-edit.obo') File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py", line 283, in __init__ cls(self).parse_from(_handle) # type: ignore File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/obo.py", line 26, in parse_from self.process_imports( File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/base.py", line 70, in process_imports return dict(pool.map(lambda i: (i, process(i)), imports)) File "/Users/manu/opt/anaconda3/lib/python3.9/multiprocessing/pool.py", line 364, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/Users/manu/opt/anaconda3/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._value File "/Users/manu/opt/anaconda3/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/Users/manu/opt/anaconda3/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar return list(map(*args)) File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/base.py", line 70, in return dict(pool.map(lambda i: (i, process(i)), imports)) File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/parsers/base.py", line 49, in process_import return Ontology(url, max(import_depth - 1, -1), timeout) File "/Users/manu/.local/share/virtualenvs/StreamlineObo-VnyTmrWh/lib/python3.9/site-packages/pronto/ontology.py", line 286, in __init__ raise ValueError(f"could not find a parser to parse {handle!r}") ValueError: could not find a parser to parse 'http://purl.obolibrary.org/obo/go/extensions/go-gci.owl' ```
@althonos
Copy link
Owner

Hi @manulera

The file you tried to import here is the Editor's version of the Gene Ontology, which is not fully reasoned / merged. In particular, the error you're getting is because pronto cannot resolve one of the imports, which is not available publicly, and typically gets merged into the release version of GO.

To use the release version, you should use:

import pronto
ontology = pronto.Ontology.from_obo_library("go.obo")

or

import pronto
ontology = pronto.Ontology("http://current.geneontology.org/ontology/go.obo")

@althonos althonos added the question A question about the library. label Apr 29, 2022
@manulera
Copy link
Author

manulera commented May 3, 2022

Hi @althonos, thanks for the info. It worked like that indeed!

Best,
Manu

@cmungall
Copy link

cmungall commented Aug 30, 2022

http://purl.obolibrary.org/obo/go/extensions/go-gci.owl is actually publicly available, but it is in functional syntax, which can't be parsed

See #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about the library.
Projects
None yet
Development

No branches or pull requests

3 participants