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

Unicycler v 0.5.0 still returns ZeroDivisionError: float division by zero error #313

Open
cmstouthamer opened this issue Mar 27, 2023 · 1 comment

Comments

@cmstouthamer
Copy link

Hello,

I have recently been using Unicycler because it's perfect for the relatively old data that I have of symbiont genomes. After the hybrid assembly stage using SPADes, Unicycler fails and returns the following errors:

File "/apps/eb/Unicycler/0.5.0-gompi-2019b-Python-3.7.4/bin/unicycler", line 10, in <module> sys.exit(main()) File "/apps/eb/Unicycler/0.5.0-gompi-2019b-Python-3.7.4/lib/python3.7/site-packages/unicycler/unicycler.py", line 156, in main args.min_dead_end_size, graph, anchor_segments) File "/apps/eb/Unicycler/0.5.0-gompi-2019b-Python-3.7.4/lib/python3.7/site-packages/unicycler/assembly_graph.py", line 1363, in clean$ usedupness_scores[seg_num] = self.get_usedupness_score(seg_num, unbridged_graph) File "/apps/eb/Unicycler/0.5.0-gompi-2019b-Python-3.7.4/lib/python3.7/site-packages/unicycler/assembly_graph.py", line 1526, in get_u$ depth_fraction_used = depth_used / original_depth ZeroDivisionError: float division by zero

I really want to use Unicycler for my dataset, and I've seen in the resolved issues tab that this problem has been addressed in other Unicycler python scripts. I was wondering if this could be a similar fix?

Thank you so much!
Corinne

@abrozzi
Copy link

abrozzi commented Jun 22, 2023

Hi,
I get the same error when I try with the sample_data provided in the installation folder

unicycler -1 /home/Unicycler/sample_data/short_reads_1.fastq.gz -2 /home/Unicycler/sample_data/short_reads_2.fastq.gz -o /home/Unicycler/testUni

Saving /home/Unicycler/testUni/004_bridges_applied.gfa
Traceback (most recent call last):
  File "/home/.local/bin/unicycler", line 33, in <module>
    sys.exit(load_entry_point('unicycler==0.5.0', 'console_scripts', 'unicycler')())
  File "/home/.local/lib/python3.9/site-packages/unicycler/unicycler.py", line 155, in main
    graph.clean_up_after_bridging_2(seg_nums_used_in_bridges, args.min_component_size,
  File "/home/.local/lib/python3.9/site-packages/unicycler/assembly_graph.py", line 1363, in clean_up_after_bridging_2
    usedupness_scores[seg_num] = self.get_usedupness_score(seg_num, unbridged_graph)
  File "/home/.local/lib/python3.9/site-packages/unicycler/assembly_graph.py", line 1526, in get_usedupness_score
    depth_fraction_used = depth_used / original_depth
ZeroDivisionError: float division by zero

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

2 participants