rrwick / Unicycler

hybrid assembly pipeline for bacterial genomes
GNU General Public License v3.0
561 stars 131 forks source link

groups: cannot find name for group ID 65471 #86

Closed sergiophyceae closed 2 years ago

sergiophyceae commented 6 years ago

Hello;

I am getting the following error after having Unicycler running for several days. It seems to occur after the SPAdes assemblies and during the 'Finding single copy segments' step. Thank you very much!

--

groups: cannot find name for group ID 65471 Traceback (most recent call last): File "/scratch2/software/Python-3.6.0/bin/unicycler", line 11, in load_entry_point('unicycler==0.3.1', 'console_scripts', 'unicycler')() File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/unicycler.py", line 79, in main single_copy_segments = get_single_copy_segments(unbridged_graph, 0) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/unicycler.py", line 605, in get_single_copy_segments determine_copy_depth(graph) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 47, in determine_copy_d epth determine_copy_depth_part_2(graph, settings.COPY_PROPAGATION_TOLERANCE, copy_depth_table) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 71, in determine_copy_d epth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 71, in determine_copy_d epth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 71, in determine_copy_d epth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) [Previous line repeated 985 more times] File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 70, in determine_copy_d epth_part_2 if redistribute_copy_depths(graph, tolerance, copy_depth_table): File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 181, in redistribute_co py_depths arrangements = shuffle_into_bins(copy_depths, bins, targets) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 390, in shuffle_into_bi ns arrangements += shuffle_into_bins(items[1:], bins_copy, targets) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 390, in shuffle_into_bi ns arrangements += shuffle_into_bins(items[1:], bins_copy, targets) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 390, in shuffle_into_bi ns arrangements += shuffle_into_bins(items[1:], bins_copy, targets) File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 395, in shuffle_into_bi ns all([not target or target == len(bins[i]) for i, target in enumerate(targets)]): File "/scratch2/software/Python-3.6.0/lib/python3.6/site-packages/unicycler/assembly_graph_copy_depth.py", line 395, in all([not target or target == len(bins[i]) for i, target in enumerate(targets)]): RecursionError: maximum recursion depth exceeded in comparison

rrwick commented 6 years ago

Hmmm, what size genome are you trying to assemble? The max-recursion error and the fact that you said 'running for several days' makes me wonder if it's unusually large.

If it's a large, eukaryote genome or a metagenome, then I'm afraid the answer is that Unicycler isn't going to work - it was designed for bacterial isolates only. But if it is really is a bacterial isolate, then I'm curious. What species?

Ryan

saramonzon commented 6 years ago

Hello!

I am having the same issue and I am working with listeria monocytogenes isolates. Actually, I have successfully assembled 111 listeria genomes with Unicycler, but two of them throws me this error in Determining graph multiplicity step:

Determining graph multiplicity (2018-08-09 12:50:04) Multiplicity is the number of times a sequence occurs in the underlying sequence. Single-copy contigs (those with a multiplicity of one, occurring only once in the underlying sequence) are particularly useful. Traceback (most recent call last): File "/opt/unicycler/unicycler-0.4.6/bin/unicycler", line 11, in load_entry_point('unicycler==0.4.6', 'console_scripts', 'unicycler')() File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/unicycler.py", line 89, in main determine_copy_depth(graph) File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 74, in determine_copy_depth determine_copy_depth_part_2(graph, settings.COPY_PROPAGATION_TOLERANCE, copy_depth_table) File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table .........Hundreds of lines like this File "/opt/Python/Python-3.5.2/lib/python3.5/site-packages/unicycler/assembly_graph_copy_depth.py", line 464, in all([not target or target == len(bins[i]) for i, target in enumerate(targets)]): RecursionError: maximum recursion depth exceeded in comparison

Any ideas?

Thanks very much! Sara

cahlstrom commented 5 years ago

I received a similar error (see below) on a single E. coli assembly out of a total of 95, the rest of which assembled without any errors. Upon reference mapping, the failed isolate had several mixed base calls, indicative of mixed culture. I'll simply exclude this isolate, so I'm not looking for a solution, but perhaps this could be part of the issue we are running into?

Christina

Error message: Unicycler now uses a greedy algorithm to propagate multiplicity through the graph. For example, if two single-copy contigs merge together, the resulting contig will get a multiplicity of two. When no more propagation is possible, additional single-copy contigs are added and the process is repeated. This allows for multiplicity to be correctly assigned to the chromosome (at the median depth) but also for plasmids (which may be higher or lower in depth). Traceback (most recent call last): File "/home/cahlstrom/Unicycler/unicycler-runner.py", line 21, in main() File "/home/cahlstrom/Unicycler/unicycler/unicycler.py", line 89, in main determine_copy_depth(graph) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 74, in determine_copy_depth determine_copy_depth_part_2(graph, settings.COPY_PROPAGATION_TOLERANCE, copy_depth_table) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2 determine_copy_depth_part_2(graph, tolerance, copy_depth_table) [Previous line repeated 984 more times] File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 103, in determine_copy_depth_part_2 if redistribute_copy_depths(graph, tolerance, copy_depth_table): File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 240, in redistribute_copy_depths arrangements = shuffle_into_bins(copy_depths, bins, targets) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins arrangements += shuffle_into_bins(items[1:], bins_copy, targets) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins arrangements += shuffle_into_bins(items[1:], bins_copy, targets) File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins arrangements += shuffle_into_bins(items[1:], bins_copy, targets) [Previous line repeated 1 more times] File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 457, in shuffle_into_bins bins_copy = [list(x) for x in bins] File "/home/cahlstrom/Unicycler/unicycler/assembly_graph_copy_depth.py", line 457, in bins_copy = [list(x) for x in bins] RecursionError: maximum recursion depth exceeded while calling a Python object

rrwick commented 2 years ago

I just hit this one myself, which allowed me to test a fix: 96ffea7

So hopefully it won't be a problem any more! However, I encountered this on a terribly complex assembly graph that resulted from a contaminated read set, so I suspect that this error was mostly occurring in cases that aren't going to assemble well regardless. But still, a fix is good!

Ryan