f04f1b9af06c823602c5e0ecd3b8c2059d7704d3 jcasper Thu Aug 27 14:42:31 2026 -0700 Faceted composites now have a max display mode setting instead of a full override of child track visibilities, with accompanying support for the onlyVisibility setting. We also now include a filter block (applied to appropriate child tracks) when those settings are in place. refs #37662 diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index 605aeba2fd1..4fea2c06980 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -473,30 +473,39 @@ if (tdb->viewHash == NULL) return NULL; return hashFindVal(tdb->viewHash, name); } char *trackDbLocalSetting(struct trackDb *tdb, char *name) /* Return setting from tdb, but *not* any of it's parents. */ { if (tdb == NULL) errAbort("Program error: null tdb passed to trackDbSetting."); if (tdb->settingsHash == NULL) tdb->settingsHash = trackDbSettingsFromString(tdb, tdb->settings); return hashFindVal(tdb->settingsHash, name); } +boolean tdbIsFacetedComposite(struct trackDb *tdb) +/* Is this a composite whose children are picked from a metadata table rather than a + * subgroup matrix? Unlike other composites, a faceted composite's own visibility is a + * maximum for its children rather than a value they inherit. */ +{ +return tdb != NULL && tdbIsComposite(tdb) + && sameOk(trackDbLocalSetting(tdb, "compositeTrack"), "faceted"); +} + struct slName *trackDbLocalSettingsWildMatch(struct trackDb *tdb, char *expression) // Return local settings that match expression else NULL. In alpha order. { if (tdb == NULL) errAbort("Program error: null tdb passed to trackDbSetting."); if (tdb->settingsHash == NULL) tdb->settingsHash = trackDbSettingsFromString(tdb, tdb->settings); struct slName *slFoundVars = NULL; struct hashCookie brownie = hashFirst(tdb->settingsHash); struct hashEl* el = NULL; while ((el = hashNext(&brownie)) != NULL) { if (wildMatch(expression, el->name)) slNameAddHead(&slFoundVars, el->name);