nPhase
nPhase copied to clipboard
ZeroDivisionError in assignLongReadToSNPs when samLines < 100
Hi,
I've come across an edge case whilst messing around with the tool. When the number of reads in the long-read alignment file is less than 100, the following code in function assignLongReadToSNPs()
will fail:
if i%(int(len(samLines)/100)) == 0:
print(int(i/len(samLines)*100)+1,"%")
If len(samLines)/100
returns a value less than 1, int()
will turn it to a 0, which results in a ZeroDivisionError
in the if
conditional.
Cheers Alastair
nPhase version: nPhase pipeline 1.1.3 Downloaded through conda
Nice catch!
There are probably a few other errors that can be caused by the same edge case. I'll fix it for the next update