2770a53d1e8e0e5773020965d19c2499439481ca chmalee Tue Feb 7 13:33:08 2023 -0800 Make hubApi return data from multiple tracks at once. Get trackDb tableBrowser setting working correctly in the api diff --git src/hg/hubApi/apiUtils.c src/hg/hubApi/apiUtils.c index 97400d4..4a4b423 100644 --- src/hg/hubApi/apiUtils.c +++ src/hg/hubApi/apiUtils.c @@ -609,71 +609,34 @@ * When NO trackDb, can't tell at this point, will check that later */ { if (tdb) { if (tdbIsContainer(tdb) || tdbIsComposite(tdb) || tdbIsCompositeView(tdb) || tdbIsSuper(tdb)) return FALSE; else return TRUE; } else return TRUE; /* might be true */ } -boolean protectedTrack(struct trackDb *tdb, char *tableName) +boolean protectedTrack(char *db, struct trackDb *tdb, char *tableName) /* determine if track is off-limits protected data */ { -boolean ret = FALSE; - -/* this is a fixed list for now since there are so few and this - * takes care of the situation where the tableName might be for a table - * that has no trackDb entry - */ -if (sameOk(tableName, "cosmicRegions")) - ret = TRUE; -else if (sameOk(tableName, "decipherRaw")) - ret = TRUE; -else if (sameOk(tableName, "knownToDecipher")) - ret = TRUE; -else if (sameOk(tableName, "knownCanonToDecipher")) - ret = TRUE; -else if (sameOk(tableName, "decipherSnvsRaw")) - ret = TRUE; -else if (sameOk(tableName, "lovd")) - ret = TRUE; -else if (sameOk(tableName, "lovdShort")) - ret = TRUE; -else if (sameOk(tableName, "lovdLong")) - ret = TRUE; -else if (sameOk(tableName, "lovdComp")) - ret = TRUE; -else if (sameOk(tableName, "hgmd")) - ret = TRUE; -else - { - if (tdb) /* may not have a tdb at this time */ - { - char *tbOff = trackDbSetting(tdb, "tableBrowser"); - if (tbOff && startsWithWord("off", tbOff)) - ret = TRUE; - if (tbOff && startsWithWord("noGenome", tbOff)) - ret = TRUE; - } - } -return ret; +return cartTrackDbIsNoGenome(db, tableName); } boolean isWiggleDataTable(char *type) /* is this a wiggle data track table */ { if (startsWith("wig", type)) { if (startsWith("wigMaf", type)) return FALSE; else return TRUE; } else return FALSE; }