geronimp / enrichM

Toolbox for comparative genomics of MAGs
80 stars 22 forks source link

ZeroDivisionError in annotate #86

Open ganiatgithub opened 5 years ago

ganiatgithub commented 5 years ago

Hi,

I have encountered this error: multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/site-packages/enrichm/annotate.py", line 43, in parse_genomes genome = Genome(params) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/site-packages/enrichm/genome.py", line 53, in init self.gc = round((gc_list/float(self.length))100, 2) ZeroDivisionError: float division by zero """

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

Traceback (most recent call last): File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/bin/enrichm", line 342, in run.run_enrichm(args, sys.argv) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/site-packages/enrichm/run.py", line 310, in run_enrichm args.protein_files) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/site-packages/enrichm/annotate.py", line 790, in annotate_pipeline genome_files, protein_files) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/site-packages/enrichm/annotate.py", line 771, in parse_genome_inputs genomes_list += self.pool.map(parse_genomes, chunk) File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/multiprocessing/pool.py", line 288, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/30days/uqgni1/tools/Miniconda3/envs/enrichm_0.5.0/lib/python3.6/multiprocessing/pool.py", line 670, in get raise self._value ZeroDivisionError: float division by zero

My code is: source activate enrichm_0.5.0 export ENRICHM_DB=/30days/uqgni1/tools/enrichm_dada

enrichm annotate \ --output /30days/uqgni1/16_1_unitem_consensus/enrichm_archaea \ --genome_directory /30days/uqgni1/16_1_unitem_consensus/Archaea_MAGs \ --ko_hmm \ --orthologs \ --threads 24 \ --log /30days/uqgni1/16_1_unitem_consensus/enrichm_archaea/log

conda deactivate

Not sure how to troubleshoot, could you help?

Cheers!

geronimp commented 5 years ago

Hi there,

I'm finding this one a little difficult to replicate. Where all the genome files in /30days/uqgni1/16_1_unitem_consensus/Archaea_MAGs full? i.e. they definitely had sequences in them?

can you narrow it down to a particular genome causing the problem at all?

Thanks, J

susheelbhanu commented 5 years ago

Hi all,

I had the same issue, but it turned out that I had a log file in my folder. Also, there was a trailing "slash" (/) after my folder name which potentially caused the issue.

[2019-09-24 10:36:46 AM] INFO: Calling proteins for annotation
[2019-09-24 10:36:46 AM] INFO:     - Calling proteins for 44 genomes
[2019-09-24 10:36:46 AM] DEBUG: ls /scratch/users/sbusi/extraction_methods/fastq_NewZealand/das_tool/B4_refineM_filtered/*fa | sed 's/fa//g' | grep -o '[^/]*$' | parallel -j 5 prodigal -q -p meta -o /dev/null -a enrichm_B4_dastoolbins/genome_proteins/{}.faa -i /scratch/users/sbusi/extraction_methods/fastq_NewZealand/das_tool/B4_refineM_filtered/{}fa  > /dev/null 2>&1
[2019-09-24 10:51:26 AM] DEBUG: Finished

Hope it helps! -Susheel

rhysnewell commented 4 years ago

I've had a similar error previously, it was due to their being .fai files in the genome directory.