d11a21c48cdc2cebe0a97779b510df8317b980cd braney Mon Sep 7 06:29:43 2026 -0700 bigNet: gate the track type behind an hg.conf flag, refs #20824 Add the boolean hg.conf setting bigNet, default FALSE, so the type ships dark and a machine turns it on with bigNet=on. trackHubBigNetEnabled() in hg/lib/trackHub.c is the one read; the four places that accept or advertise the type ask it. validateOneTrack drops bigNet from the hub track type allowlist, validateOneTdb drops it from the types quickLift will lift, hubCheck drops it from VALID_TRACK_TYPES and from the message listing the valid types, and hubApi does not add it to supportedTypes. netToBigNet, netTrack.c, chainNetDbLoad.c and the hgc details code are unchanged, since they cannot be reached once a bigNet track will not load. With the flag off hgTracks does not abort the hub. It draws the track row as a bigWarn bar reading "Unsupported type 'bigNet ...'" and the rest of the hub loads normally. Register the flag in hgConfCatalog.py with role="gate" so the sunset report tracks it. diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index 599b19d8e0b..42613d4d88f 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -987,30 +987,37 @@ { struct trackHubGenome *ret = hashFindVal(hub->genomeHash, genomeName); if (ret == NULL) ret = hashFindVal(hub->genomeHash, hubConnectSkipHubPrefix(genomeName)); return ret; } static void requireBarChartBars(struct trackHub *hub, struct trackHubGenome *genome, struct trackDb *tdb) /* Fetch setting(s) or give an error message */ { if (!trackDbSetting(tdb, BAR_CHART_CATEGORY_URL) && !trackDbSetting(tdb, BAR_CHART_CATEGORY_LABELS)) errAbort("BarChart track '%s' is missing either %s or %s setting. Please add one of those settings to the appropriate stanza", tdb->track, BAR_CHART_CATEGORY_LABELS, BAR_CHART_CATEGORY_URL); } +boolean trackHubBigNetEnabled() +/* Return TRUE if the bigNet track type is turned on. Off unless hg.conf says + * bigNet=on. Everything that accepts or advertises the type asks this. */ +{ +return cfgOptionBooleanDefault("bigNet", FALSE); +} + static void validateOneTrack( struct trackHub *hub, struct trackHubGenome *genome, struct trackDb *tdb) /* Validate a track's trackDb entry. */ { /* Check for existence of fields required in all tracks */ requiredSetting(hub, genome, tdb, "shortLabel"); char *shortLabel = trackDbSetting(tdb, "shortLabel"); memSwapChar(shortLabel, strlen(shortLabel), '\t', ' '); requiredSetting(hub, genome, tdb, "longLabel"); char *longLabel = trackDbSetting(tdb, "longLabel"); memSwapChar(longLabel, strlen(longLabel), '\t', ' '); /* Forbid any dangerous settings that should not be allowed */ forbidSetting(hub, genome, tdb, "idInUrlSql"); @@ -1048,31 +1055,31 @@ // both places must be changed or common code created. if (!(startsWithWord("wig", type)|| startsWithWord("bedGraph", type))) { if (!(startsWithWord("bigWig", type) || startsWithWord("bigBed", type) || startsWithWord("pslSnake", type) || startsWithWord("halSnake", type) || startsWithWord("vcfTabix", type) || startsWithWord("vcfPhasedTrio", type) || startsWithWord("bigPsl", type) || startsWithWord("bigMaf", type) || startsWithWord("longTabix", type) || startsWithWord("bigGenePred", type) || startsWithWord("bigNarrowPeak", type) || startsWithWord("bigChain", type) || - startsWithWord("bigNet", type) || + (startsWithWord("bigNet", type) && trackHubBigNetEnabled()) || startsWithWord("bigLolly", type) || startsWithWord("bigBaseView", type) || startsWithWord("bigRmsk", type) || startsWithWord("bigBarChart", type) || startsWithWord("bigInteract", type) || startsWithWord("bigMethyl", type) || startsWithWord("hic", type) || startsWithWord("bigDbSnp", type) || startsWithWord("instaPort", type) || startsWithWord("bam", type))) { errAbort("Unsupported type '%s' in hub %s genome %s track %s", type, hub->url, genome->name, tdb->track); } requiredSetting(hub, genome, tdb, "bigDataUrl"); @@ -1940,31 +1947,31 @@ /* Make sure the tdb is a track type we grok. badList may be NULL to validate * silently (no user-facing complaint about non-liftable types). */ { // 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("bigNet", tdb->type) || \ + (startsWithNoCase("bigNet", tdb->type) && trackHubBigNetEnabled()) || \ 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("bigNet", tdb->type) || \ startsWithNoCase("bigWig", tdb->type)) { char *fileName = cloneString(trackDbSetting(tdb, "bigDataUrl"));