da79c37696a46e9978a93218407e6afcdc71326c galt Fri Aug 14 17:45:37 2020 -0700 Fixed bug in hgLiftOver CGI and liftOver utility reported by user. Also tested liftability of knwonGene on Chr1 to panTro6. All remining cases of Boundary error are real and not due to a bug. Added test cases, especially for BED12 which had been oddly missing. refs #26057. diff --git src/hg/lib/liftOver.c src/hg/lib/liftOver.c index c72901e..6e65268 100644 --- src/hg/lib/liftOver.c +++ src/hg/lib/liftOver.c @@ -885,31 +885,34 @@ else { slAddHead(&badList, r); } r = nextR; if (r == NULL) { done = TRUE; break; } nextR = r->next; gotStart = FALSE; } if (done) break; - if (b->tEnd < r->end) + + // May have multiple small chain segments spanned by one exon, + // so advance one exon if we are in the middle of a run, have start but no end yet. + if (b->tEnd < r->end && gotStart) { b = b->next; if (b == NULL) { done = TRUE; break; } } if (done) break; } slReverse(&goodList); slReverse(&badList); if (needThick) {