src/hg/hgTables/microarrayTables.c 1.2

1.2 2009/04/10 20:04:29 tdreszer
Fix many instances of using composite tdb when subtrack tdb is needed
Index: src/hg/hgTables/microarrayTables.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/microarrayTables.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/hg/hgTables/microarrayTables.c	17 Mar 2009 10:13:27 -0000	1.1
+++ src/hg/hgTables/microarrayTables.c	10 Apr 2009 20:04:29 -0000	1.2
@@ -7,20 +7,14 @@
 #include "customTrack.h"
 #include "microarray.h"
 #include "hgTables.h"
 
-boolean isMicroarray(struct trackDb *curTrack, char *table)
+boolean isMicroarray(struct trackDb *parent, char *table)
 /* Return TRUE if table is specified as a microarray in the current database's 
  * trackDb. */
 {
-if (curTrack && sameString(curTrack->tableName, table))
-    return (startsWith("expRatio", curTrack->type) || startsWith("array", curTrack->type));
-else
-    {
-    struct trackDb *tdb = hTrackDbForTrack(database, table);
-    return (tdb && (startsWith("expRatio", tdb->type) || startsWith("array", tdb->type)));
-    }
-return FALSE;
+struct trackDb *tdb = findTdbForTable(database, parent, table);
+return (tdb && (startsWith("expRatio", tdb->type) || startsWith("array", tdb->type)));
 }
 
 void doOutMicroarrayNames(struct trackDb *tdb)
 /* Show the microarray names from .ra file */