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

RuntimeError: dictionary changed size during iteration #22

Closed JuanmaMedina closed 6 years ago

JuanmaMedina commented 6 years ago

Good morning Shamir and community,

I am trying to apply Recycler over my SPAdes graph but I keep getting this error:

Traceback (most recent call last): File "/usr/local/home/lmt243/anaconda3/pkgs/recycler-0.6.2-py27_0/bin/recycle.py", line 70, in G.remove_nodes_from(nx.isolates(G)) File "/usr/local/home/lmt243/.local/lib/python2.7/site-packages/networkx-2.1-py2.7.egg/networkx/classes/digraph.py", line 555, in remove_nodes_from for n in nodes: File "/usr/local/home/lmt243/.local/lib/python2.7/site-packages/networkx-2.1-py2.7.egg/networkx/algorithms/isolate.py", line 94, in return (n for n, d in G.degree() if d == 0) File "/usr/local/home/lmt243/.local/lib/python2.7/site-packages/networkx-2.1-py2.7.egg/networkx/classes/reportviews.py", line 368, in iter for n in self._nodes: RuntimeError: dictionary changed size during iteration

I know this error has been reported and closed before, but I have tried the solution described there and I still cannot solve this error (downgrading Python networkX from 2.0 to 1.11)

System: Ubuntu Linux

numpy 1.14.0
networkx 2.0
pysam 0.11.2.2
nose 1.3.7
BWA 0.7.17
samtools 1.7
SPAdes 3.11.1

Recycler and these associated dependencies were installed through conda.

Thanks a lot in advance, if you need more info, please, drop me a line!

Best, Juanma

UPDATE: Recycler seems to work installing the associated dependencies with conda and cloning the last version from here, as dpellow suggested. I did not updated before because the script is still running,may have got stuck at some point. But the script.py launches with no problem.

dpellow commented 6 years ago

Hi Juanma,

The latest update of Recycler should be compatible with networkx 2.0. Can you clone the latest update and let us know if you are still experiencing this problem?

Thanks

dpellow commented 6 years ago

This has been fixed -see discussion at issue #17