f577b4c8199360dac5b955dfc4ede99d57c2946f
braney
  Wed Jul 9 16:57:59 2025 -0700
ongoing work on quickLift, including displaying mismatches

diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c
index a254a8d7b0e..98f07c60183 100644
--- src/hg/lib/hubConnect.c
+++ src/hg/lib/hubConnect.c
@@ -468,72 +468,77 @@
 return p;
 }
 
 
 void hubConnectAddDescription(char *database, struct trackDb *tdb)
 /* Fetch tdb->track's html description (or nearest ancestor's non-empty description)
  * and store in tdb->html. */
 {
 unsigned hubId = hubIdFromTrackName(tdb->track);
 struct hubConnectStatus *hub = hubFromId(hubId);
 struct trackHubGenome *hubGenome = trackHubFindGenome(hub->trackHub, database);
 trackHubPolishTrackNames(hub->trackHub, tdb);
 trackHubAddDescription(hubGenome->trackDbFile, tdb);
 }
 
+static void addQuickToHash(struct hash *hash, char *chain, char *db)
+{
+hashAdd(hash, "quickLiftUrl", chain);
+hashAdd(hash, "quickLiftDb", db);
+}
+
 static void assignQuickLift(struct trackDb *tdbList, char *quickLiftChain, char *db)
 /* step through a trackDb list and assign a quickLift chain to each track */
 {
 if (tdbList == NULL)
     return;
 
 struct trackDb *tdb;
 for(tdb = tdbList; tdb; tdb = tdb->next)
     {
     assignQuickLift(tdb->subtracks, quickLiftChain, db);
 
-    hashAdd(tdb->settingsHash, "quickLiftUrl", quickLiftChain);
-    hashAdd(tdb->settingsHash, "quickLiftDb", db);
+    addQuickToHash( tdb->settingsHash, quickLiftChain, db);
 
     if (tdb->parent)
         {
-        hashAdd(tdb->parent->settingsHash, "quickLiftUrl", quickLiftChain);
-        hashAdd(tdb->parent->settingsHash, "quickLiftDb", db);
+        addQuickToHash( tdb->parent->settingsHash, quickLiftChain, db);
         }
     }
 }
 
 // a string to define trackDb for quickLift chain
 static char *chainTdbString = 
     "shortLabel chain to %s\n"
     "longLabel chain to %s\n"
     "type bigChain %s\n"
     "chainType reverse\n"
     "bigDataUrl %s\n"
-    "quickLiftUrl %s\n";
+    "quickLiftUrl %s\n"
+    "quickLiftDb %s\n";
 
 static struct trackDb *makeQuickLiftChainTdb(struct trackHubGenome *hubGenome,  struct hubConnectStatus *hub)
 // make a trackDb entry for a quickLift chain
 {
 struct trackDb *tdb;
 
 AllocVar(tdb);
 
 char buffer[4096];
 safef(buffer, sizeof buffer, "hub_%d_quickLiftChain", hub->id);
 tdb->table = tdb->track = cloneString(buffer);
-safef(buffer, sizeof buffer, chainTdbString, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftChain, hubGenome->quickLiftChain);
+safef(buffer, sizeof buffer, chainTdbString, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftChain, hubGenome->quickLiftChain, hubGenome->quickLiftDb);
 tdb->settings = cloneString(buffer);
 tdb->settingsHash = trackDbSettingsFromString(tdb, buffer);
 trackDbFieldsFromSettings(tdb);
 tdb->visibility = tvDense;
 
 return tdb;
 }
 
 static struct trackDb *fixForQuickLift(struct trackDb *tdbList, struct trackHubGenome *hubGenome, struct hubConnectStatus *hub)
 // assign a quickLift chain to the tdbList and make a trackDb entry for the chain. 
 {
 assignQuickLift(tdbList, hubGenome->quickLiftChain, hub->trackHub->defaultDb);
 
 struct trackDb *quickLiftTdb = makeQuickLiftChainTdb(hubGenome, hub);
 quickLiftTdb->grp = tdbList->grp;