Skip to content

ZeroDivisionError: division by zero #43

@waterhouseBenth

Description

@waterhouseBenth

Hello,

I got error below. is it the error caused by small number of K-mer? how to change options to avoid the error?

Thanks
anji

...
25-03-21 16:16:24 [INFO] 45488711 kmers in total
25-03-21 16:16:24 [INFO] Filtering differential kmers
25-03-21 16:16:24 [WARNING] Singleton [['09']] is ignored
25-03-21 16:16:24 [WARNING] Singleton [['10']] is ignored
25-03-21 16:16:24 [WARNING] Singleton [['19']] is ignored
25-03-21 16:16:27 [INFO] Start Pool with 16 process(es)
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/site-packages/subphaser-1.2.6-py3.8.egg/subphaser/Jellyfish.py", line 629, in _filter_kmer
freq = count/lens if not by_count else count
ZeroDivisionError: division by zero
"""

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

Traceback (most recent call last):
File "/home/an/miniconda3/envs/SubPhaser/bin/subphaser", line 33, in
sys.exit(load_entry_point('subphaser==1.2.6', 'console_scripts', 'subphaser')())
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/site-packages/subphaser-1.2.6-py3.8.egg/subphaser/main.py", line 797, in main
pipeline.run()
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/site-packages/subphaser-1.2.6-py3.8.egg/subphaser/main.py", line 422, in run
d_mat = dumps.filter(d_mat, lengths, self.sgs, outfig=histfig, #d_targets=d_targets,
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/site-packages/subphaser-1.2.6-py3.8.egg/subphaser/Jellyfish.py", line 491, in filter
for kmer, freqs, tot_freq in pool_func(_filter_kmer, args, self.ncpu,
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/site-packages/subphaser-1.2.6-py3.8.egg/subphaser/RunCmdsMP.py", line 347, in pool_func
for returned in pool_map(func, iterable, **kargs):
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/an/miniconda3/envs/SubPhaser/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
ZeroDivisionError: division by zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions