1d4663b313f73cf69360c84c3c123821f15cee26
braney
  Sat Aug 9 11:49:49 2025 -0700
some fixes for hgLiftOver using Genark hubs

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 14541873cbf..10116648f78 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -4937,54 +4937,67 @@
 }
 
 struct dbDb *hGetLiftOverFromDatabases()
 /* Get list of databases for which there is at least one liftOver chain file
  * from this assembly to another.
  * Dispose of this with dbDbFreeList. */
 {
 struct dbDb *allDbList = NULL;
 struct dbDb *liftOverDbList = NULL, *dbDb, *nextDbDb;
 struct liftOverChain *chainList = NULL, *chain;
 struct hash *hash = newHash(0), *dbNameHash = newHash(3);
 
 /* Get list of all liftOver chains in central database */
 chainList = liftOverChainList();
 
+struct dyString *dy = newDyString(4096);
 /* Create hash of databases having liftOver chains from this database */
 for (chain = chainList; chain != NULL; chain = chain->next)
     {
     if (!hashFindVal(hash, chain->fromDb))
         hashAdd(hash, chain->fromDb, chain->fromDb);
+    if (startsWith("GC", chain->fromDb))
+        {
+        dyStringPrintf(dy, "'%s',", chain->fromDb);
+        }
+
     }
 
 /* Get list of all databases */
 allDbList = hDbDbList();
 
 /* Create a new dbDb list of all entries in the liftOver hash */
 for (dbDb = allDbList; dbDb != NULL; dbDb = nextDbDb)
     {
     /* current dbDb entries */
     nextDbDb = dbDb->next;
     if (hashFindVal(hash, dbDb->name) && !hashFindVal(dbNameHash, dbDb->name))
 	{
         slAddHead(&liftOverDbList, dbDb);
 	hashAdd(dbNameHash, dbDb->name, dbDb->name);
 	}
     else
         dbDbFree(&dbDb);
     }
 
+if (cfgOptionBooleanDefault("genarkLiftOver", FALSE) && (strlen(dy->string) > 0))
+    {
+    dy->string[strlen(dy->string) - 1] = 0;
+    struct dbDb *genarkDbDbs = genarkLiftOverDbs(dy->string);
+    liftOverDbList = slCat(genarkDbDbs, liftOverDbList);
+    }
+
 hashFree(&hash);
 hashFree(&dbNameHash);
 liftOverChainFreeList(&chainList);
 
 /* sort by orderKey so that assemblies always appear from most recent */
 /* to the oldest assemblies in the dropdown menu for fromDbs */
 slSort(&liftOverDbList, hDbDbCmpOrderKey);
 
 return liftOverDbList;
 }
 
 struct dbDb *hGetLiftOverToDatabases(char *fromDb)
 /* Get list of databases for which there are liftOver chain files
  * to convert from the fromDb assembly.
  * Dispose of this with dbDbFreeList. */