mitoNGS/MToolBox

bug in prioritized_variants.py

Opened this issue · 1 comments

Variant prioritization fails when "NA" is encountered, which throws the following error:

prioritization.py priority_tmp.txt
Traceback (most recent call last):
  File "/path/to/MToolBox/MToolBox/prioritization.py", line 42, in
    tmp[3]=float(tmp[3])
ValueError: could not convert string to float: NA

I am a bit surprised that this has not been reported before, as I have come across it during the analysis of two datasets I have. I have written a quick hack in my local installation:

prio=[]
for k in dic_var_sam2:
samples=dic_var_sam2[k]
tmp=[k,samples]
tmp.extend(clean[k][1:])
# start hack
if tmp[3] == "NA":
tmp[3] = 555 # ridiculous number, instantly recognizable in output
# end hack
tmp[3]=float(tmp[3])
prio.append(tmp)

dwuab commented

I have just encountered the same error.