marbl / ModDotPlot

MIT License
120 stars 9 forks source link

ZeroDivisionError: integer division or modulo by zero #31

Open justdx opened 3 months ago

justdx commented 3 months ago

Dear Alexander,

Thank you very much for developing such a nice tool. I am using it to visualize the centromere repeats and it works very for most of the sequence. However, to some certain sequences, I have encountered an error with message "ZeroDivisionError: integer division or modulo by zero" (please see details below). Could you please let me know what is the possible reason behind and how can I solve it? The command I used was "moddotplot static -f 1.32M.fa -w 10000 -id 70 --no-plot -o ./".

v0.8.4

Running ModDotPlot in static mode

Retrieving k-mers from 1320000....

Progress: |████████████████████████████████████████| 100.0% Completed

1320000 k-mers retrieved!

Computing self identity matrix for 1320000...

Sequence length n: 328954

Window size w: 10000

Modimizer sketch size: 1250

Plot Resolution r: 33

Traceback (most recent call last):-----------------| 0.0% Complete File "/ModDotPlot/venv/bin/moddotplot", line 5, in from moddotplot.main import main File "/ModDotPlot/venv/lib/python3.8/site-packages/moddotplot/main.py", line 11, in sys.exit(main()) File "/ModDotPlot/venv/lib/python3.8/site-packages/moddotplot/moddotplot.py", line 867, in main self_mat = createSelfMatrix( File "/ModDotPlot/venv/lib/python3.8/site-packages/moddotplot/estimate_identity.py", line 50, in createSelfMatrix matrix = selfContainmentMatrix( File "/ModDotPlot/venv/lib/python3.8/site-packages/moddotplot/estimate_identity.py", line 321, in selfContainmentMatrix if w % progress_thresholds == 0: ZeroDivisionError: integer division or modulo by zero