Out of bounds error
Running i get the following error
Traceback (most recent call last):
File "mtoolbox/1.0.2/MToolBox/assembleMTgenome.py", line 443, in
two points m1 = sorted(l)[(len(l)/2)+1-1] is a little weird with the +1 -1 (compiler will most likely take out anyways, but a little strange).
Also this would only occur if len(l) == 0 (as far as i can tell), is it possible to put a check for this and return 0 as median (assuming this is correct behaviour)
Let me know if you have any questions or concerns :)
I have the same issue (see. issue #38 ) . I write a comment here to receive the follow-up and/or updates. Thank you again.
I met this problem also! Mark and hope get the follow-up. Thx
Now I have a solution to fix this issue. open this file:~/MToolBox/MToolBox/mtVariantCaller.py change line 406: except ZeroDivisionError: to except IndexError:
This issue reason is : when input parameter "l" is empty, python will throw an error "IndexError", it is not error "ZeroDivisionError".
I re-run my two samples which met this issue, both of them are fixed and get the right results.
If you still encounter this problem, you can left a message at here.
Best!