109deb5abe91b3ddffd40b6b1162fef2e907e520 kent Mon Feb 7 15:01:45 2011 -0800 Making hub tracks had intersection show up. diff --git src/hg/hgTables/intersect.c src/hg/hgTables/intersect.c index 7e5c5dc..866885d 100644 --- src/hg/hgTables/intersect.c +++ src/hg/hgTables/intersect.c @@ -3,57 +3,60 @@ #include "common.h" #include "linefile.h" #include "hash.h" #include "portable.h" #include "cheapcgi.h" #include "cart.h" #include "jksql.h" #include "trackDb.h" #include "bits.h" #include "bed.h" #include "hdb.h" #include "featureBits.h" #include "jsHelper.h" #include "hgTables.h" #include "customTrack.h" +#include "hubConnect.h" #include "wikiTrack.h" static char const rcsid[] = "$Id: intersect.c,v 1.54 2010/06/03 18:53:59 kent Exp $"; /* We keep two copies of variables, so that we can * cancel out of the page. */ static char *curVars[] = {hgtaIntersectGroup, hgtaIntersectTrack, hgtaIntersectTable, hgtaIntersectOp, hgtaMoreThreshold, hgtaLessThreshold, hgtaInvertTable, hgtaInvertTable2, }; 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); static boolean canIntersect(char *db, char *table) /* Return true if table exists and is positional. */ { if (isCustomTrack(table) && ctLookupName(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);