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

ZeroDivisionError: division by zero #33

Open
hdflorezr opened this issue May 18, 2024 · 0 comments
Open

ZeroDivisionError: division by zero #33

hdflorezr opened this issue May 18, 2024 · 0 comments

Comments

@hdflorezr
Copy link

Hi.

I was running metapop and I get the follow error:

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_filter.py", line 205, in parse_reads
parse_entry(read, output_reads, is_global = is_global, min_length = min_length, min_pct_id = min_pct_id)
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_filter.py", line 381, in parse_entry
pct_id = (sum/(total_count))*100
ZeroDivisionError: division by zero
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/omicas/miniconda3/envs/metapop/bin/metapop", line 8, in
sys.exit(main())
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_main.py", line 297, in main
metapop.metapop_filter.filt(original_bams, filter_command_base, bdb, threads, mag_contig_dict, mag_length_dict, joined_fastas)
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_filter.py", line 167, in filt
p.map(parse_reads, commands)
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/omicas/miniconda3/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
ZeroDivisionError: division by zero

I also need additional help, related to if I can (or can't) run the pipeline from the last process and if yes, how could I do this?

I don't really know why this happened, but I'd like to find for some help.

Thanks.

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

1 participant