a733eb4377d20aad86d9e1b3657b00da2f9028fe
braney
  Sat Jan 17 10:42:42 2026 -0800
when quicklifting a genePred we need to reverse the exon frames if the
strand changed

diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index 920e46a683e..8e585734aa4 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -6304,30 +6304,42 @@
 
 // using this loader on genePred tables with less than 15 fields may be a problem.
 extern struct genePred *genePredExtLoad15(char **row);
 
     struct genePred *gpList = (struct genePred *)quickLiftSql(conn, quickLiftFile, table, chromName, winStart, winEnd,  NULL, NULL, (ItemLoader2)genePredExtLoad15, 0, chainHash);
     hFreeConn(&conn);
 
     calcLiftOverGenePreds( gpList, chainHash, 0.0, 1.0, TRUE, NULL, NULL,  TRUE, FALSE);
     struct genePred *gp = gpList;
 
     struct linkedFeatures *lfList = NULL;
     for(;gp; gp = gp->next)
         {
         if (gp->chrom == NULL) // if the lift failed, ignore this one
             continue;
+        // we need to reverse the order of the exon frames if the quickLift changed the strand
+        if (quickLiftFile && (gp->strand[0] != gp->origStrand) && (gp->exonCount > 1))
+            {
+            int *reorderFrames;
+            AllocArray(reorderFrames, gp->exonCount);
+
+            int ii;
+            for(ii=0; ii < gp->exonCount; ii++)
+                reorderFrames[ii] = gp->exonFrames[(gp->exonCount - 1) - ii];
+
+            gp->exonFrames = reorderFrames;
+            }
         slAddHead(&lfList, linkedFeaturesFromGenePred(tg, gp, TRUE));
         }
     slReverse(&lfList);
     tg->items = lfList;
     }
 else
     {
     struct sqlConnection *conn = hAllocConn(database);
     tg->items = connectedLfFromGenePredInRangeExtra(tg, conn, tg->table,
                                             chromName, winStart, winEnd, extra);
     hFreeConn(&conn);
     }
 }
 
 struct linkedFeatures *lfFromGenePredInRange(struct track *tg, char *table,