rrwick / Unicycler

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

RecursionError: maximum recursion depth exceeded while getting the str of an object #301

Open alienzj opened 2 years ago

alienzj commented 2 years ago
Command error:
  Traceback (most recent call last):
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/bin/unicycler", line 10, in <module>
      sys.exit(main())
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/site-packages/unicycler/unicycler.py", line 82, in main
      determine_copy_depth(graph)
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/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 "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/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 "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/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 "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/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)
    [Previous line repeated 988 more times]
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/site-packages/unicycler/assembly_graph_copy_depth.py", line 99, in determine_copy_depth_part_2
      while merge_copy_depths(graph, tolerance, copy_depth_table):
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/site-packages/unicycler/assembly_graph_copy_depth.py", line 174, in merge_copy_depths
      add_to_copy_depth_table(' + '.join(get_seg_name_depth_str(graph, x)
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/site-packages/unicycler/assembly_graph_copy_depth.py", line 174, in <genexpr>
      add_to_copy_depth_table(' + '.join(get_seg_name_depth_str(graph, x)
    File "/home/jiezhu/.conda/envs/bactopia/share/bactopia-2.1.x/conda/envs/assemble_genome-2.1.x/lib/python3.8/site-packages/unicycler/assembly_graph_copy_depth.py", line 184, in get_seg_name_depth_str
      copy_str = '(' + str(len(graph.copy_depths[segment_num])) + 'x)'
  RecursionError: maximum recursion depth exceeded while getting the str of an object
alienzj commented 2 years ago
unicyler version: 0.5.0
alienzj commented 2 years ago

Hi, @rrwick, I used unicycler to assemble short reads, but I meet the above error. Could you please help me to figure out it ?

alienzj commented 2 years ago

Bin Id Marker lineage # genomes # markers # marker sets 0 1 2 3 4 5+ Completeness Contamination Strain heterogeneity :------------------------------------------------------------------------------------------------------------------- E20 fEnterobacteriaceae (UID5124) 134 1173 336 94 832 224 22 1 0 92.51 25.26 72.97 E230 fEnterobacteriaceae (UID5124) 134 1173 336 129 843 183 18 0 0 89.27 19.19 65.82 E445 f__Enterobacteriaceae (UID5124) 134 1173 336 232 264 642 32 3 0 82.11 67.03 88.36

Thanks for the detailed documents of unicycler. I think maybe sequence contamination? So I used shovill to assemble it, and then used checkm to evaluate the quality of the genome, and found that there is a lot of heterogeneity. So, maybe I should fix the sequence contamination issue first.

Thanks!