This patch fixes the issue reported in github issue harrispopgen#14.
The issue originates from bisect.bisect using 1-based indexes, as
shown here, causing
the script to not extract the index correctly when the variant fall out
or within the last index. Also, it causes to intersect with the wrong
interval in the next if statement, since pointing to the index+1
position in the list.
This patch fixes the issue reported in github issue harrispopgen#14. The issue originates from bisect.bisect using 1-based indexes, as shown here, causing the script to not extract the index correctly when the variant fall out or within the last index. Also, it causes to intersect with the wrong interval in the next if statement, since pointing to the index+1 position in the list.