jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

Illegal division by zero in step 18.getbins.pl - at calculating coverage #815

Closed SamBrutySci closed 3 months ago

SamBrutySci commented 3 months ago

Hi,

I'm running this pipeline in a HPC cluster and its worked for 10/11 quite large batches of samples. However, one batch of samples keeps getting this error when trying to restart. It initially terminated due to reaching the run time limit, but so did other samples and they restarted without any issues.

"Illegal division by zero at /opt/mamba_squeezemeta/SqueezeMeta/scripts/18.getbins.pl line 168. Died at /opt/mamba_squeezemeta/bin/SqueezeMeta.pl line 831."

The output finishes here:

Reading data for bin concoct.74.fa_sub.contigs
Reading data for bin concoct.47.fa_sub.contigs
Reading data for bin concoct.243.fa_sub.contigs
Reading data for bin concoct.49.fa.contigs
Reading data for bin concoct.266.fa.contigs
Reading data for bin concoct.99.fa.contigs
Reading data for bin concoct.137.fa.contigs
Reading data for bin metabat2.31.fa_sub.contigs
Reading data for bin metabat2.95.fa_sub.contigs
Reading data for bin concoct.72.fa.contigs
Reading data for bin metabat2.19.fa_sub.contigs
Reading data for bin concoct.3.fa.contigs
Calculating coverages Stopping in STEP18 -> 18.getbins.pl 

Would you have any ideas that I could try to fix this? Let me know if you need any more information!

Thanks!

fpusan commented 3 months ago

It would seem like 18.getbins.pl thinks that one of your bins has a size of zero. Can you check the fasta files in /path/to/project/results/bins to see if all have content?

SamBrutySci commented 3 months ago

They all have a file size - the smallest .fa is 4kb and the smallest .fa.tax is 518 bytes

SamBrutySci commented 3 months ago

Hey, just to update I restarted from the binning step (step 14) with --force_overwrite which fixed whatever was going on in step 18! Thanks for your help!