EukDetect
EukDetect copied to clipboard
ZeroDivisionError: division by zero
Hello,
I'm trying to run eukdetect --mode runall --configfile default_configfile.yml --cores 16
and I'm getting this error:
02/10/2022 16:00:54: Parsing config file ...
Traceback (most recent call last):
File "/home/antoniog/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>
sys.exit(load_entry_point('EukDetect==1.0.1', 'console_scripts', 'eukdetect')())
File "/home/antoniog/miniconda3/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 139, in main
File "/home/antoniog/miniconda3/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 459, in check_readlen
ZeroDivisionError: division by zero
any idea what could be going on?
If it helps:
- Tests run just fine:
$ python tests/test_eukdetect.py
.....
----------------------------------------------------------------------
Ran 5 tests in 87.763s
OK
- The command was initially failing with this error:
$ eukdetect --mode runall --configfile default_configfile.yml --cores 16
02/10/2022 15:58:27: Parsing config file ...
02/10/2022 15:58:27: Error: missing files in database directory: all_buscos_v4.fna.1.bt2, all_buscos_v4.fna.2.bt2, all_buscos_v4.fna.3.bt2, all_buscos_v4.fna.4.bt2, all_buscos_v4.fna.rev.1.bt2, all_buscos_v4.fna.rev.2.bt2
but changing it to ncbi_eukprot_met_arch_markers.fna
(AFAIK newest version) let it continue.
Thank you!
The issue was that some of the gz files had zero reads after QC (removing any reads below 100bps).
Thanks for the update. Just to be clear, you get an error reporting that the database is empty, but the issue is that your read files don't contain reads longer than the cutoff specified in the config file?
We use fastp for our QC (but I have seen this with other tools too) and if there are no sequences that pass our parameters that tool writes empty fastq.gz files. Then, EukDetect opens that file, reads it with 0 counts and python raises an error due to a division by zero. Hope this helps.