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

loading local json files fails #607

Open
dosumis opened this issue Dec 1, 2021 · 1 comment
Open

loading local json files fails #607

dosumis opened this issue Dec 1, 2021 · 1 comment

Comments

@dosumis
Copy link

dosumis commented Dec 1, 2021

loading local OboGraph JSON files following examples from the notebooks or using local obograph JSON files generated by ROBOT consistently => empty graphs

eg.

from ontobio.ontol_factory import OntologyFactory
ont = OntologyFactory()
n = ont.create("./tests/resources/nucleus.json")
2021-12-01 22:16:19 [WARNING] [PID:90975 TID:4447808960] [sparql_ontol_utils.py:98 in `get_edges`]  No edges for ./tests/resources/nucleus.json
2021-12-01 22:16:19 [ERROR] [PID:90975 TID:4447808960] [sparql_ontology.py:233 in `__init__`]  Empty graph for './tests/resources/nucleus.json' - did you use the correct id?

# OTOH - Loading remote using OBO ontology ID works fine. 

pato = ont.create('pato')
pato.search('morphology')
['PATO:0000051']
pato.parents('PATO:0000051')
['PATO:0001241']

I've seen this with both PyPi install and the latest code from GitHub.

@dosumis
Copy link
Author

dosumis commented Dec 2, 2021

I've realised this only works with files in the working directory or if path to root directory is given. Keeping open as I think this should be better documented.

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

1 participant