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 render subgraphs using GraphRenderer #612

Open
remerjohnson opened this issue Jan 27, 2022 · 0 comments
Open

Cannot render subgraphs using GraphRenderer #612

remerjohnson opened this issue Jan 27, 2022 · 0 comments

Comments

@remerjohnson
Copy link

Following along with this notebook for rendering subgraphs using GraphRenderer, when running:

nodes = ont.traverse_nodes(qids, up=False, down=True)

from ontobio.io.ontol_renderers import GraphRenderer
w = GraphRenderer.create('tree')
w.write_subgraph(ont, nodes, query_ids=qids)

I receive the error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_24716/3071084711.py in <module>
      1 from ontobio.io.ontol_renderers import GraphRenderer
      2 w = GraphRenderer.create('tree')
----> 3 w.write_subgraph(ont, nodes, query_ids=qids)

C:\Anaconda3\envs\ontobio-env\lib\site-packages\ontobio\io\ontol_renderers.py in write_subgraph(self, ontol, nodes, **args)
     75         Write a `ontology` object after inducing a subgraph
     76         """
---> 77         subont = ontol.subontology(nodes, **args)
     78         self.write(subont, **args)
     79 

TypeError: subontology() got an unexpected keyword argument 'query_ids'

If I remove query_ids argument, the error is thrown as: AttributeError: 'EagerWikidataOntology' object has no attribute 'xref_graph'

Thanks for any help you can provide.

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