Shamir-Lab / Recycler

This is the codebase for Recycler, described in our manuscript: https://academic.oup.com/bioinformatics/article/33/4/475/2623362, by Roye Rozov, Aya Brown Kav, David Bogumil, Naama Shterzer, Eran Halperin, Itzhak Mizrahi, and Ron Shamir
BSD 3-Clause "New" or "Revised" License
58 stars 7 forks source link

Recycle.py: Runtime error #17

Closed Freemacl closed 6 years ago

Freemacl commented 6 years ago

When I try to execute recycle.py, I get the following error:

Traceback (most recent call last): File "/home/imss/.local/bin/recycle.py", line 4, in import('pkg_resources').run_script('recycler==0.62', 'recycle.py') File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 738, in run_script File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 1506, in run_script File "/home/imss/.local/lib/python2.7/site-packages/recycler-0.62-py2.7.egg/EGG-INFO/scripts/recycle.py", line 83, in

File "/home/imss/.local/lib/python2.7/site-packages/networkx-2.0b2-py2.7.egg/networkx/classes/digraph.py", line 535, in remove_nodes_from for n in nbunch: File "/home/imss/.local/lib/python2.7/site-packages/networkx-2.0b2-py2.7.egg/networkx/algorithms/isolate.py", line 94, in return (n for n, d in G.degree() if d == 0) File "/home/imss/.local/lib/python2.7/site-packages/networkx-2.0b2-py2.7.egg/networkx/classes/reportviews.py", line 367, in iter for n in self._nodes: RuntimeError: dictionary changed size during iteration

System: Ubuntu Linux For what it's worth, I was able to get everything up and running on my personal comp (mac osx), but I'm hoping to use this [unfortunately problematic] computer as it is much faster.

rozovr commented 6 years ago

Thanks. Are you sure all the dependencies are covered? How did you install?

Freemacl commented 6 years ago

MacOS (works):

Ubuntu (doesn't work):

salvoc81 commented 6 years ago

I was getting the same error on MacOS 10.12 (Sierra). Matching the versions of the module fixed the issue.

rozovr commented 6 years ago

Hi @salvoc81, do you mean the versions that are in the README? @Freemacl, sorry for my delay, am wrapping up my thesis now; will look into this soon

nwatarai commented 6 years ago

Hi, I got the same error, but downgraded Python networkX from 2.0 to 1.11 and the error disappeared.

Freemacl commented 6 years ago

@nwatarai @salvoc81 Thanks for the help! That fixed my issue. Phew.

dpellow commented 6 years ago

I got this as well. Fixed by changing line 83 of recycle.py: G.remove_nodes_from(nx.isolates(G)) --> G.remove_nodes_from(list(nx.isolates(G)))

See: http://pelegm-networkx.readthedocs.io/en/latest/reference/generated/networkx.algorithms.isolate.isolates.html

dpellow commented 6 years ago

Merged bug fix into master