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

Recycle.py: Runtime error #17

Closed
Freemacl opened this issue Aug 30, 2017 · 8 comments
Closed

Recycle.py: Runtime error #17

Freemacl opened this issue Aug 30, 2017 · 8 comments

Comments

@Freemacl
Copy link

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
Copy link
Collaborator

rozovr commented Aug 31, 2017

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

@Freemacl
Copy link
Author

Freemacl commented Sep 5, 2017

MacOS (works):

  • numpy 1.12.1
  • networkx 1.11
  • pysam 0.11.2.2
  • nose 1.3.7
  • BWA 0.7.5a
  • samtools 1.5
  • SPAdes 3.10.1
    none of the dependencies were met, so I installed with conda

Ubuntu (doesn't work):

  • numpy 1.11.1
  • networkx 2.0b2
  • pysam 0.12
  • nose 1.3.7
  • BWA 0.7.12
  • samtools 1.5
  • SPAdes 3.10.1
    Was only missing networkX, which I installed via pip

@salvoc81
Copy link

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

@rozovr
Copy link
Collaborator

rozovr commented Sep 13, 2017

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
Copy link

nwatarai commented Sep 26, 2017

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

@Freemacl
Copy link
Author

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

@dpellow
Copy link
Collaborator

dpellow commented Jan 3, 2018

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 pushed a commit to dpellow/Recycler that referenced this issue Jan 4, 2018
dpellow added a commit to dpellow/Recycler that referenced this issue Jan 4, 2018
Fix bug issue Shamir-Lab#17: cast isolates iterator to list for networkX 2.0
dpellow added a commit that referenced this issue Jan 4, 2018
 Fix bug issue #17: cast isolates iterator to list for networkX 2.0
@dpellow
Copy link
Collaborator

dpellow commented Jan 4, 2018

Merged bug fix into master

@dpellow dpellow closed this as completed Jan 4, 2018
cameronmartino added a commit to cameronmartino/Recycler that referenced this issue Feb 5, 2018
Fix bug issue Shamir-Lab#17: cast isolates iterator to list for networkX 2.0
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

5 participants