parklab / NGSCheckMate

Software program for checking sample matching for NGS data
MIT License
126 stars 48 forks source link

ZeroDivisionError: float division by zero in math.sqrt(xdiff2 * ydiff2) #35

Open elagina opened 4 years ago

elagina commented 4 years ago

File "ncm.py", line 61, in pearson_def return diffprod / math.sqrt(xdiff2 * ydiff2) ZeroDivisionError: float division by zero

when passing 2 vcfs that are very similar. Here are x and y that were passed to pearson_def(x,y) function

x = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
y = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]