254686140b97de7d7f85906dcf70f78a9601d7d0 braney Mon Sep 8 15:10:10 2025 -0700 ongoing work on quickLift diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c index 3313c06e84f..3c99aba6fdb 100644 --- src/hg/lib/hubConnect.c +++ src/hg/lib/hubConnect.c @@ -342,32 +342,34 @@ struct sqlResult *sr = sqlGetResult(conn, query); char **row; char *replaceDb = NULL; char *quickLiftChain = NULL; char *toDb = NULL; while ((row = sqlNextRow(sr)) != NULL) { replaceDb = cloneString(row[0]); toDb = cloneString(row[1]); quickLiftChain = cloneString(row[2]); break; // there's only one } sqlFreeResult(&sr); // don't load quickLift hubs that aren't for us - //if ((db == NULL) || sameOk(toDb, hubConnectSkipHubPrefix(db))) + if ((db == NULL) || sameOk(toDb, hubConnectSkipHubPrefix(db))) hub = hubConnectStatusForIdExt(conn, id, replaceDb, toDb, quickLiftChain); + else + removeQuickListReference(cart, id, toDb); } if (hub != NULL) { if (!isEmpty(hub->errorMessage) && (strstr(hub->hubUrl, "hgComposite") != NULL)) { // custom collection hub has disappeared. Remove it from cart cartSetString(cart, hgHubConnectRemakeTrackHub, "on"); char buffer[1024]; safef(buffer, sizeof buffer, "hgHubConnect.hub.%d", id); cartRemove(cart, buffer); } else slAddHead(&hubList, hub); } } @@ -504,53 +506,63 @@ struct trackDb *tdb; for(tdb = tdbList; tdb; tdb = tdb->next) { assignQuickLift(tdb->subtracks, quickLiftChain, db); addQuickToHash( tdb->settingsHash, quickLiftChain, db); if (tdb->parent) { 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" +char *chainTdbString = + "shortLabel %s Chain\n" + "longLabel %s Chain\n" + "type bigChain %s\n" + "bigDataUrl %s\n" + "quickLiftUrl %s\n" + "quickLiftDb %s\n" + "otherTwoBitUrl %s\n"; + +// a string to define trackDb for quickLift chain +char *controlTdbString = + "shortLabel Warnings %s\n" + "longLabel Warnings %s\n" "type bigQuickLiftChain %s\n" "chainType reverse\n" "bigDataUrl %s\n" "quickLiftUrl %s\n" "quickLiftDb %s\n" "otherTwoBitUrl %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); char otherTwoBitFile[4096]; hNibForChrom(hubGenome->quickLiftDb, NULL, otherTwoBitFile); -safef(buffer, sizeof buffer, chainTdbString, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftChain, hubGenome->quickLiftChain, hubGenome->quickLiftDb, otherTwoBitFile); +safef(buffer, sizeof buffer, controlTdbString, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftDb, hubGenome->quickLiftChain, hubGenome->quickLiftChain, hubGenome->quickLiftDb, otherTwoBitFile); 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;