5fc426954da9ceb7dc42b9760858bbd1189760e1 braney Fri Sep 4 13:08:14 2026 -0700 quickLift: lift MAF blocks, and let bigMaf and wigMaf tracks into the hub Most of this was already written. mafSubset does the part that looked hard, which is recomputing every row's start and size when columns are taken away, so what was left was deciding where to cut. quickLiftMafs cuts a block at every chain block boundary. Inside one chain block the two assemblies run in step, so the columns carry over untouched and only the first row's coordinates change. Across a boundary the reference either loses bases or gains them, and either way the block can no longer be one contiguous run on the reference, which is the one thing a MAF block has to be. The reference row is named with the assembly name minus any hub prefix, since that is the name the maf drawing code builds when it goes looking for it. A minus strand chain turns the block over, so every row is turned over with it and the forward start comes from the far end of the run. That path is written but has not been exercised: no minus strand quickLift chain wins in a window I could find. validateOneTdb accepts bigMaf and wigMaf. Plain maf is left out on purpose: those tracks are drawn by mafTrack.c, which has no quickLift path, so offering them would hand back a track read from the wrong assembly. refs #38249 diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index d49d2f1cd2e..c5138f21acc 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -1941,46 +1941,49 @@ { // trackDb types are matched without regard to case since that's how the rest of the // browser reads them (some trackDb stanzas say "bigbed" rather than "bigBed"). if (sameString("cytoBandIdeo", trackHubSkipHubName(tdb->track)) || !( startsWithNoCase("bigBed", tdb->type) || \ startsWithNoCase("bigWig", tdb->type) || \ startsWithNoCase("bigDbSnp", tdb->type) || \ startsWithNoCase("bigGenePred", tdb->type) || \ startsWithNoCase("gvf", tdb->type) || \ startsWithNoCase("genePred", tdb->type) || \ startsWithNoCase("narrowPeak", tdb->type) || \ startsWithNoCase("broadPeak", tdb->type) || \ startsWithNoCase("bigLolly", tdb->type) || \ startsWithNoCase("bigPsl", tdb->type) || \ startsWithNoCase("bigChain", tdb->type) || \ + startsWithNoCase("bigMaf", tdb->type) || \ + startsWithNoCase("wigMaf", tdb->type) || \ sameWord("chain", tdb->type) || startsWithNoCase("chain ", tdb->type) || sameWord("psl", tdb->type) || startsWithNoCase("psl ", tdb->type) || sameWord("bed", tdb->type) || startsWithNoCase("bed ", tdb->type))) { if (badList != NULL) slAddHead(badList, tdb); return FALSE; } // make sure we have a bigDataUrl if (startsWithNoCase("bigBed", tdb->type) || \ startsWithNoCase("bigPsl", tdb->type) || \ startsWithNoCase("bigChain", tdb->type) || \ + startsWithNoCase("bigMaf", tdb->type) || \ startsWithNoCase("bigWig", tdb->type)) { char *fileName = cloneString(trackDbSetting(tdb, "bigDataUrl")); if (fileName == NULL) { struct sqlConnection *conn = hAllocConnTrack(db, tdb); fileName = bbiNameFromSettingOrTable(tdb, conn, tdb->table); hashAdd(tdb->settingsHash, "bigDataUrl", fileName); hFreeConn(&conn); } } return TRUE; }