Commit 71db687
committed
Treat regions [-1,n) as [0,n) when indexing
In VCF files, 1-based POS=0 represents an event in a telomere.
POS=0 is represented as 0-based [-1,0), which previously led to a crash
during indexing. Instead treat [-1,0) as [0,1) and larger [-1,n) as [0,n)
so that such regions will be placed in an appropriately-sized leftmost
bin. (Treat [-1,0) slightly more specially as [0,0) winds up in bin 0.)
The previous crash occurred within insert_to_l(); this fixes the crash and
alters beg/end for [-1,n) regions for both insert_to_l() and insert_to_b().
Fixes #406.1 parent e79775f commit 71db687
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1366 | 1366 | | |
1367 | 1367 | | |
1368 | 1368 | | |
1369 | | - | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1370 | 1373 | | |
| 1374 | + | |
1371 | 1375 | | |
1372 | 1376 | | |
1373 | 1377 | | |
| |||
0 commit comments