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

Unable to create Pronto object since 2.5.6 (synonyms change) #219

Open
Zethson opened this issue Mar 13, 2024 · 2 comments
Open

Unable to create Pronto object since 2.5.6 (synonyms change) #219

Zethson opened this issue Mar 13, 2024 · 2 comments

Comments

@Zethson
Copy link

Zethson commented Mar 13, 2024

Since the 2.5.6 release and the changes to how synonyms are handled (#218), I run into

Traceback (most recent call last):
  File "/home/zeth/PycharmProjects/bionty-base/test.py", line 8, in <module>
    Ontology("efo.owl")
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/ontology.py", line 283, in __init__
    cls(self).parse_from(_handle)  # type: ignore
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/parsers/rdfxml.py", line 119, in parse_from
    self._process_axiom(axiom, curies)
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/parsers/rdfxml.py", line 819, in _process_axiom
    for s in entity.synonyms
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/entity/__init__.py", line 465, in synonyms
    return frozenset(Synonym(ontology, s) for s in termdata.synonyms)
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/entity/__init__.py", line 465, in <genexpr>
    return frozenset(Synonym(ontology, s) for s in termdata.synonyms)
  File "/home/zeth/miniconda3/envs/bionty/lib/python3.10/site-packages/pronto/synonym.py", line 133, in __init__
    raise ValueError(f"undeclared synonym type: {syndata.type}")
ValueError: undeclared synonym type: OMO:0003000

when trying to read the https://www.ebi.ac.uk/efo/ ontology.

Works with 2.5.5, does NOT work with 2.5.6 anymore.

from pronto import Ontology

Ontology("efo.owl")
@igumnov-daniel
Copy link

*(for those who may find this thread later)

Today pronto v2.5.5 works with v3.66.0 efo.owl version , but doesn't work with newer efo version, so you don't only need to downgrade pronto but to download older efo as well.

@Zethson
Copy link
Author

Zethson commented Oct 9, 2024

That's because the newer EFO version is broken. See: EBISPOT/efo#2264 (also for a solution). I can read EFO 3.70+ by fixing the owl file as outlined in the thread.

Nevertheless, this issue is still open and relevant.

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

No branches or pull requests

2 participants