83ccf1c6b15c91b83723894b882f3af1e340882b braney Sun Jun 1 16:37:23 2025 -0700 exon frames are in transcription strand order so if it's changed during quickLift we need to flip the order in the genePred diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 26a11f0779c..37ea8d167e2 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -9349,31 +9349,40 @@ struct hash *chainHash = NULL; if (quickLiftFile) bbList = quickLiftGetIntervals(quickLiftFile, bbi, seqName, winStart, winEnd, &chainHash); else bbList = bigBedIntervalQuery(bbi, seqName, winStart, winEnd, 0, lm); struct genePred *gpList = NULL; for (bb = bbList; bb != NULL; bb = bb->next) { struct genePred *gp = NULL; if (quickLiftFile) { struct bed *bed; if ((bed = quickLiftIntervalsToBed(bbi, chainHash, bb)) != NULL) { struct bed *bedCopy = cloneBed(bed); - gp =(struct genePred *) genePredFromBedBigGenePred(seqName, bedCopy, bb); + + char startBuf[16], endBuf[16]; + char *bedRow[bbi->fieldCount]; + bigBedIntervalToRow(bb, seqName, startBuf, endBuf, bedRow, ArraySize(bedRow)); + + // bedRow[5] has original strand in it, bedCopy has new strand. If they're different we want to reverse exonFrames + boolean changedStrand = FALSE; + if (*bedRow[5] != *bedCopy->strand) + changedStrand = TRUE; + gp =(struct genePred *) genePredFromBedBigGenePred(seqName, bedCopy, bb, changedStrand); } } else gp = (struct genePred *)genePredFromBigGenePred(seqName, bb); if ((gp != NULL) && sameString(gp->name, geneName)) slAddHead(&gpList, gp); } lmCleanup(&lm); return gpList; } static struct genePred *getGenePredForPosition(char *table, char *geneName) /* Build a genePred list for the given table and gene name. */