churchmanlab / genewalk

GeneWalk identifies relevant gene functions for a biological context using network representation learning
https://churchman.med.harvard.edu/genewalk
BSD 2-Clause "Simplified" License
128 stars 15 forks source link

TypeError: Input graph is not a networkx graph type #2

Closed pax6pax6 closed 4 years ago

pax6pax6 commented 4 years ago

Is there any additional inputs required for running GeneWalk on a list of human gene IDs? I am running the following command, which has about 80 gene names from a DE experiment.

genewalk --project test --genes /results.txt --id_type hgnc_symbol

Which returned this:

INFO: [2019-09-11 12:01:29] genewalk.nx_mg_assembler - Adding gene edges from Pathway Commons to graph. Traceback (most recent call last): File "/anaconda3/lib/python3.6/site-packages/networkx/convert.py", line 46, in _prep_create_using create_using.clear() TypeError: clear() missing 1 required positional argument: 'self'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/anaconda3/bin/genewalk", line 11, in sys.exit(main()) File "/anaconda3/lib/python3.6/site-packages/genewalk/cli.py", line 151, in main resource_manager=rm) File "/anaconda3/lib/python3.6/site-packages/genewalk/nx_mg_assembler.py", line 38, in load_network mg = PcNxMgAssembler(genes, resource_manager=resource_manager) File "/anaconda3/lib/python3.6/site-packages/genewalk/nx_mg_assembler.py", line 196, in init self.add_pc_edges() File "/anaconda3/lib/python3.6/site-packages/genewalk/nx_mg_assembler.py", line 214, in add_pc_edges create_using=nx.MultiGraph) File "/anaconda3/lib/python3.6/site-packages/networkx/convert_matrix.py", line 313, in from_pandas_edgelist g = _prep_create_using(create_using) File "/anaconda3/lib/python3.6/site-packages/networkx/convert.py", line 48, in _prep_create_using raise TypeError("Input graph is not a networkx graph type")

Any insight?

bgyori commented 4 years ago

I am not immediately sure what the problem is, but two possibilities:

pax6pax6 commented 4 years ago

Updating networkx solved the problem! It seems to be running now. Should've thought to double check the dependencies. Thanks a lot for your help!