src/hg/hgTables/compositeTrack.c 1.17

1.17 2009/05/20 20:59:55 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/compositeTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/compositeTrack.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -B -U 4 -r1.16 -r1.17
--- src/hg/hgTables/compositeTrack.c	16 Apr 2009 18:34:06 -0000	1.16
+++ src/hg/hgTables/compositeTrack.c	20 May 2009 20:59:55 -0000	1.17
@@ -148,35 +148,8 @@
 printf("Base-pair-wise union (OR) of %s and other selected subtracks<P>\n",
        curTable);
 }
 
-struct trackDb *findTdbForTable(char *db,struct trackDb *parent,char *table)
-/* Find or creates the tdb for this table.  Might return NULL! (e.g. all tables) */
-{
-if(isEmpty(table))
-    return parent;
-struct trackDb *tdb = NULL;
-if (isCustomTrack(table))
-    {
-    struct customTrack *ct = lookupCt(table);
-    if (ct != NULL)
-        tdb = ct->tdb;
-    }
-else
-    tdb = tdbFindOrCreate(db,parent,table);
-return tdb;
-}
-
-char *findTypeForTable(char *db,struct trackDb *parent,char *table)
-/* Finds the TrackType for this Table */
-{
-struct trackDb *tdb = findTdbForTable(db,parent,table);
-if(tdb)
-    return tdb->type;
-return (parent?parent->type:NULL);
-}
-
-
 void doSubtrackMergeMore(struct sqlConnection *conn)
 /* Respond to subtrack merge create/edit button */
 {
 struct trackDb *primary = subTdbFind(curTrack,curTable);