992aeef92fea7be25a2acd916578898649212a32 braney Mon Sep 7 11:31:07 2026 -0700 quickLift: gate the alignment lift behind an hg.conf flag, refs #38249 Add browser.quickLiftAlignments, default FALSE, so the alignment lift ships dark and a machine turns it on with browser.quickLiftAlignments=on. It sits beside browser.quickLift, the gate on the rest of the feature. quickLiftAlignmentsEnabled() in hg/lib/quickLift.c is the one read, and validateOneTdb in hg/lib/trackHub.c is the one place that asks it, before an alignment track may enter a quickLift hub. That is the only door: quickLiftUrl and quickLiftDb, the pair every lift path keys off, are written by the quickLift hub writer and by nothing else, so with the flag off an alignment track never gets them and the lifting, drawing and details code behind them cannot be reached. pslTrack.c, chainTrack.c, wigMafTrack.c, bigBedTrack.c and hgc.c are unchanged. With the flag off hgConvert lists psl, bigPsl, chain, bigChain, maf, bigMaf and wigMaf tracks in its "type is not supported by QuickLift" table, which is what it did before this work. A hub built while the flag was on keeps working after it is turned off, since its stanzas are already in the hub file in trash, so this holds the feature back from people who have not used it rather than switching off a session that has. Read the hg.conf half with a literal cfgOptionBooleanDefault rather than cartOrCfgOption so harvestHgConf.py can see it; a cart variable of the same name still overrides it. Register the flag in hgConfCatalog.py with role="gate" so the sunset report tracks it, and turn it on in confs/hgwdev.hg.conf. diff --git src/hg/inc/quickLift.h src/hg/inc/quickLift.h index 53a2b2382b5..0396747597d 100644 --- src/hg/inc/quickLift.h +++ src/hg/inc/quickLift.h @@ -127,30 +127,35 @@ // leaves a chain between the reference and that species. The query side is left alone. // Returns NULL if the chain doesn't map. The chain handed in is not modified. struct psl *quickLiftPsls(struct hash *chainHash, struct psl *pslList); // Map a list of alignments in the other assembly's coordinates onto our current reference. // Alignments that don't map are dropped. struct encodePeak *quickLiftPeaks(struct encodePeak *peakList, struct hash *chainHash); // Map a list of encodePeaks in query coordinates to our current reference. These can't go // through quickLiftBeds: the thickStart and thickEnd it assigns overlay signalValue and // pValue in struct encodePeak. boolean quickLiftEnabled(struct cart *cart); /* Return TRUE if feature is available */ +boolean quickLiftAlignmentsEnabled(struct cart *cart); +/* Return TRUE if quickLift is allowed to lift alignment tracks: psl, bigPsl, chain, + * bigChain, maf, bigMaf and wigMaf. Off unless hg.conf says + * browser.quickLiftAlignments=on, and a cart variable of the same name overrides that. */ + struct quickLiftRegions *quickLiftGetRegions(char *ourDb, char *liftDb, char *quickLiftFile, char *chrom, int seqStart, int seqEnd); /* Figure out the highlight regions and cache them. */ char *quickLiftChainTable(); /* Return the name of the quickLiftChain table. */ void quickLiftResolveTable(struct trackDb *tdb, char *trackTable, char **retTable, char **retLiftDb); /* Resolve the table name and liftDb for a quickLift track. For custom tracks, * sets *retLiftDb to CUSTOM_TRASH and *retTable to the dbTableName setting; * otherwise sets *retTable to trackTable. Caller should have already set * *retLiftDb to trackDbSetting(tdb, "quickLiftDb"). */ struct bed *quickLiftSqlLoadBeds(struct trackDb *tdb, char *trackTable, char *liftDb, char *chrom, int start, int end, char *extraWhere, ItemLoader2 loader, int numFields, boolean blocked);