src/hg/hgTables/hgTables.c 1.172
1.172 2009/03/10 01:25:24 kent
First cut of bigWig integration. Handles data point and stats output in cases where there are no filters or intersections going.
Index: src/hg/hgTables/hgTables.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/hgTables.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -b -B -U 4 -r1.171 -r1.172
--- src/hg/hgTables/hgTables.c 9 Jan 2009 00:58:26 -0000 1.171
+++ src/hg/hgTables/hgTables.c 10 Mar 2009 01:25:24 -0000 1.172
@@ -173,8 +173,29 @@
*pTable = s;
}
}
+boolean trackIsType(char *table, char *type)
+/* Return TRUE track is a specific type. Type should be something like "bed" or
+ * "bigBed" or "bigWig" */
+{
+struct trackDb *tdb = NULL;
+if (isCustomTrack(table))
+ {
+ struct customTrack *ct = lookupCt(table);
+ if (ct != NULL)
+ tdb = ct->tdb;
+ }
+else
+ {
+ if (curTrack && sameString(curTrack->tableName, table))
+ tdb = curTrack;
+ else
+ tdb = hTrackDbForTrack(database, table);
+ }
+return tdb != NULL && startsWithWord(type, tdb->type);
+}
+
struct trackDb *findCompositeTdb(struct trackDb *track, char *table)
/* find the tdb for the table, if it is custom or composite or ordinary */
{
struct trackDb *tdb = track;