diriano / ploidyNGS

Explore ploidy levels from NGS data alone
GNU General Public License v3.0
38 stars 14 forks source link

Error Message - ZeroDivisionError: integer division or modulo by zero #8

Closed etvedte closed 5 years ago

etvedte commented 6 years ago

Greetings,

I'm trying to use ploidyNGS to make predictions about putatively haploid/diploid datasets. I followed the documentation and received the following error:

./ploidyNGS.py --guess_ploidy -o DF_genome -d 100000 -b DF_I_DNA_genome_SORTED.bam ###############################################################

This is ploidyNGS version v3.1.2

Current date and time: Thu Feb 22 16:20:01 2018

############################################################### BAM index present... OK! Number of mapped reads from BAM: 31817941 Traceback (most recent call last): File "./ploidyNGS.py", line 130, in averageCoverage=countTotalReads/countTotalPositions ZeroDivisionError: integer division or modulo by zero

I'm guessing by the error output that the denominator in averageCoverage is zero, but that shouldn't be the case. My bam file contains a large eukaryotic genome with lots of scaffolds, but I wanted to test using the -d flag as a first pass before splitting bam into scaffolds. Any help is appreciated!

diriano commented 5 years ago

you may have scaffold with very low coverage, and these are giving rise to the problem. I would suggest to run ploidyNGS on well covered scaffolds, at least 50x.

aldembert commented 5 years ago

Ok thanks a lot Diego!

On Thu, Jan 31, 2019 at 9:39 AM Diego Mauricio Riaño-Pachón < notifications@github.com> wrote:

you may have scaffold with very low coverage, and these are giving rise to the problem. I would suggest to run ploidyNGS on well covered scaffolds, at least 50x.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/diriano/ploidyNGS/issues/8#issuecomment-459390356, or mute the thread https://github.com/notifications/unsubscribe-auth/AJhBmTGu49Q8GJAOEZTysXVYCaC6Hk1Nks5vIw4kgaJpZM4SQGD8 .