8de67388be9a67cb94ba95615b7643b4ddc385da
braney
  Thu Sep 24 17:48:19 2026 -0700
quickLift: give a lifted maf block the reference's own bases, refs #38249

Inside a chain block the two assemblies run in step but need not agree base for base, and
the first row of a lifted block still carried the other assembly's letters.  The details
page showed hg19's base in the human row of a block lifted onto hg38.  quickLiftMafs now
reads the reference sequence once over the span of the lifted blocks and writes it into
that row, leaving the gaps where they are.

The lifted blocks are also sorted by position now.  On a chain that turns the alignment
over they came back last to first, and the details page listed them in that order.

diff --git src/hg/hgTracks/wigMafTrack.c src/hg/hgTracks/wigMafTrack.c
index c39ec052a43..8149bfc06f0 100644
--- src/hg/hgTracks/wigMafTrack.c
+++ src/hg/hgTracks/wigMafTrack.c
@@ -310,31 +310,31 @@
         {
         struct sqlConnection *conn = hAllocConn(liftDb);
         struct sqlConnection *conn2 = hAllocConn(liftDb);
         someMafs = wigMafLoadInRegion(conn, conn2, table, range->chrom,
             range->start, range->end, getTrackMafFile(track));
         hFreeConn(&conn);
         hFreeConn(&conn2);
         }
     srcList = slCat(srcList, someMafs);
     }
 
 // The browser looks for its reference row by the assembly name without a hub prefix,
 // which is how the maf drawing code builds the name it searches for.
 char refSrc[512];
 safef(refSrc, sizeof refSrc, "%s.%s", hubConnectSkipHubPrefix(database), chromName);
-return quickLiftMafs(chainHash, srcList, liftDb, refSrc,
+return quickLiftMafs(chainHash, srcList, liftDb, database, chromName, refSrc,
                      hChromSize(database, chromName));
 }
 
 static void loadMafsToTrack(struct track *track)
 /* load mafs in region to track custom pointer */
 {
 struct sqlConnection *conn;
 struct sqlConnection *conn2;
 struct mafPriv *mp = getMafPriv(track);
 
 if (inSummaryMode(cart, track->tdb, winBaseCount))
     return;
 
 int begin = winStart - 2;
 if (begin < 0)