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

CL has KeyError: 'CARO:0000000' #156

Open
quirinmanz opened this issue Feb 16, 2022 · 4 comments
Open

CL has KeyError: 'CARO:0000000' #156

quirinmanz opened this issue Feb 16, 2022 · 4 comments
Labels
external An issue related to an external dependency or project.

Comments

@quirinmanz
Copy link

Hi,

Overall, I find this package pretty useful.

I tried to load the Cell Ontology as described in the Examples:

cl = Ontology("http://purl.obolibrary.org/obo/cl.obo")

Unfortunately, I get the following error:
image

It looks like is_a relationships are only expected from the same ontology.

Any help would be appreciated.

Best,
Quirin

@althonos
Copy link
Owner

althonos commented Feb 16, 2022

This is an problem on the CL side, I'll get in touch with the developers. It is not expected for an OBO ontology to contain dangling clauses (referencing undeclared entities), so they should fix it.

In the meantime, you can try using the cl-basic.obo release, which is lacking some axioms and relationships to other ontologies, but doesn't have this problem:

>>> import pronto
>>> cl = pronto.Ontology("http://purl.obolibrary.org/obo/cl-basic.obo")

@althonos althonos added the external An issue related to an external dependency or project. label Feb 16, 2022
@quirinmanz
Copy link
Author

quirinmanz commented Feb 17, 2022

Thank you, that is very helpful!

Interestingly, I get the following error, when using from_obo_library:
image
I have the same problem with other local obo files (not cl):
image

Do you have an idea on how to solve this?

UPDATE:
Just realized that there is no basic version for uberon.
I managed to load cl, uberon and efo using a local owl file from https://www.ebi.ac.uk/ols/ontologies.
There are a lot of SyntaxWarnings but I guess I can ignore them.

@althonos
Copy link
Owner

You need to specify the extension with Ontology.from_obo_library:

cl = pronto.Ontology.from_obo_library("cl-basic.obo")

and there is also a basic uberon (it will raise some warnings):

uberon = pronto.Ontology.from_obo_library("uberon/basic.obo")

@cmungall
Copy link

cmungall commented Apr 8, 2022

I agree these ontologies should be fixed as its confusing to have these dangling classes - but it's not a violation of the spec, and it can be useful to be able to parse these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external An issue related to an external dependency or project.
Projects
None yet
Development

No branches or pull requests

3 participants