312123fe72695f041738fb3729961c31d5c9593e angie Wed May 11 10:19:13 2016 -0700 When the hgtaIntersectTable is carried over from a SQL database, but we have switched to a track hub database, various is<Type> functions were calling sql-only hdb functions. Added support for track hub db to hTableExists(); check existence before trying to determine the type of some table. diff --git src/hg/hgTables/intersect.c src/hg/hgTables/intersect.c index 1294ebd..cd491af 100644 --- src/hg/hgTables/intersect.c +++ src/hg/hgTables/intersect.c @@ -33,45 +33,45 @@ static char *nextVars[] = {hgtaNextIntersectGroup, hgtaNextIntersectTrack, hgtaNextIntersectTable, hgtaNextIntersectOp, hgtaNextMoreThreshold, hgtaNextLessThreshold, hgtaNextInvertTable, hgtaNextInvertTable2, }; /* This is already duplicated in correlate.c and is handy -- should be * libified, probably in cart.h. */ void removeCartVars(struct cart *cart, char **vars, int varCount); boolean canIntersect(char *db, char *table) /* Return true if table exists and is positional. */ { if (isCustomTrack(table) && ctLookupName(table) != NULL) return TRUE; +if (! hTableOrSplitExists(db, table)) + return FALSE; if (isBamTable(table)) return TRUE; if (isBigWigTable(table)) return TRUE; if (isBigBed(database, table, curTrack, ctLookupName)) return TRUE; if (isVcfTable(table, NULL)) return TRUE; if (isHubTrack(table)) return TRUE; if (sameWord(table, WIKI_TRACK_TABLE)) return TRUE; -if (hTableOrSplitExists(db, table)) return isPositional(db, table); -return FALSE; } boolean anyIntersection() /* Return TRUE if there's an intersection to do. */ { boolean specd = (cartVarExists(cart, hgtaIntersectTrack) && cartVarExists(cart, hgtaIntersectTable)); if (specd && canIntersect(database, curTable)) { char *table = cartString(cart, hgtaIntersectTable); if (canIntersect(database, table)) return TRUE; else { /* If the specified intersect table doesn't exist (e.g. if we