1cbb143dea2cf4ece990707556b4c2caac7f0311 braney Thu Mar 21 13:50:58 2024 -0700 fixing bugs in quickLift diff --git src/hg/lib/quickLift.c src/hg/lib/quickLift.c index a187a7d..218229a 100644 --- src/hg/lib/quickLift.c +++ src/hg/lib/quickLift.c @@ -59,31 +59,35 @@ continue; int qStart = cb->qStart; int qEnd = cb->qEnd; // get the range for the links on the "other" species for(; cb; cb = cb->next) { if (cb->qStart < qStart) qStart = cb->qStart; if (cb->qEnd > qEnd) qEnd = cb->qEnd; } // now grab the items - struct bigBedInterval *thisInterval = bigBedIntervalQuery(bbi, chain->qName, qStart, qEnd, 10000, lm); + struct bigBedInterval *thisInterval = NULL; + if (chain->qStrand == '-') + thisInterval = bigBedIntervalQuery(bbi, chain->qName, chain->qSize - qEnd, chain->qSize - qStart, 10000, lm); + else + thisInterval = bigBedIntervalQuery(bbi, chain->qName, qStart, qEnd, 10000, lm); bbList = slCat(thisInterval, bbList); // for the mapping we're going to use the same chain we queried on to map the items, but we need to swap it chainSwap(chain); if (*pChainHash == NULL) *pChainHash = newHash(0); liftOverAddChainHash(*pChainHash, chain); } return bbList; } struct bed *quickLiftBed(struct bbiFile *bbi, struct hash *chainHash, struct bigBedInterval *bb) /* Using chains stored in chainHash, port a bigBedInterval from another assembly to a bed