popucui / bsmap

Automatically exported from code.google.com/p/bsmap
0 stars 0 forks source link

Division by zero error in methratio.py #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3. python methratio.py --ref=mm9.fa --out=brain_control_chr8.txt --chr=chr8 
--context=CG --zero-meth *.bam

What is the expected output? 
total XXX valid mappings, XXX covered cytosines, average coverage: XXX fold.

What do you see instead?
Traceback (most recent call last):
  File "methratio.py", line 253, in <module>
    disp('total %d valid mappings, %d covered cytosines, average coverage: %.2f fold.' % (nmap, nc, float(nd)/nc))
ZeroDivisionError: float division by zero

What version of the product are you using? On what operating system?
I am using bsmap 2.87, and running ubuntu 14.04 (i686)

Please provide any additional information below.

Original issue reported on code.google.com by atoo...@gmail.com on 2 Sep 2014 at 5:02

GoogleCodeExporter commented 8 years ago
I've submitted issue #21, which subsumes this one and provides a working 
version of methratio.py

Original comment by dprya...@gmail.com on 11 Sep 2014 at 8:29