8c3d74369118f9b19b7befdfbf596bb0ae9b3ab5 braney Fri May 7 16:32:20 2021 -0700 when passing coordinates to binKeeper, make sure the range is at least a base wide. This allows for zero width ranges to be lifted over. #24836 diff --git src/hg/lib/liftOver.c src/hg/lib/liftOver.c index 3e73f5f..7915bf6 100644 --- src/hg/lib/liftOver.c +++ src/hg/lib/liftOver.c @@ -64,31 +64,31 @@ map->bk = binKeeperNew(0, chain->tSize); hashAddSaveName(chainHash, chain->tName, map, &map->name); } binKeeperAdd(map->bk, chain->tStart, chain->tEnd, chain); ++chainCount; } } static struct binElement *findRange(struct hash *chainHash, char *chrom, int start, int end) /* Find elements that intersect range. */ { struct chromMap *map = hashFindVal(chainHash, chrom); if (map == NULL) return NULL; -return binKeeperFind(map->bk, start, end); +return binKeeperFind(map->bk, start, (end == start) ? end + 1 : end); } static int chainAliSize(struct chain *chain) /* Return size of all blocks in chain. */ { struct cBlock *b; int total = 0; for (b = chain->blockList; b != NULL; b = b->next) total += b->qEnd - b->qStart; return total; } static int aliIntersectSize(struct chain *chain, int tStart, int tEnd) /* How many bases in chain intersect region from tStart to tEnd */ {