src/hg/hgTables/intersect.c 1.51

1.51 2009/05/20 20:59:56 mikep
Libified findTdbForTable, findTypeForTable, trackIsType, hIsBigBed from hgTables so that other code can easily determine if a track is a bigBed.
Index: src/hg/hgTables/intersect.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/intersect.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -b -B -U 4 -r1.50 -r1.51
--- src/hg/hgTables/intersect.c	14 Apr 2009 14:16:35 -0000	1.50
+++ src/hg/hgTables/intersect.c	20 May 2009 20:59:56 -0000	1.51
@@ -39,9 +39,9 @@
 
 static boolean canIntersect(char *db, char *table)
 /* Return true if table exists and is positional. */
 {
-if (isCustomTrack(table) && lookupCt(table) != NULL)
+if (isCustomTrack(table) && ctLookupName(table) != NULL)
     return TRUE;
 if (sameWord(table, WIKI_TRACK_TABLE))
     return TRUE;
 if (hTableOrSplitExists(db, table))
@@ -611,9 +611,9 @@
     Bits *bits1 = NULL;
     Bits *bits2 = NULL;
     struct bed *bedMerged = NULL;
     struct trackDb *subtrack = NULL;
-    char *primaryType = findTypeForTable(database,curTrack,table);
+    char *primaryType = findTypeForTable(database,curTrack,table, ctLookupName);
     char *op = cartString(cart, hgtaSubtrackMergeOp);
     boolean isBpWise = (sameString(op, "and") || sameString(op, "or"));
     double moreThresh = cartDouble(cart, hgtaSubtrackMergeMoreThreshold);
     double lessThresh = cartDouble(cart, hgtaSubtrackMergeLessThreshold);