Skip to content

Cannot render subgraphs using GraphRenderer #612

Description

@remerjohnson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions