79c5090c373a449c3fa3e83949736e7515f03da2
braney
  Tue Feb 5 09:36:59 2019 -0800
support schemas on bigWigs within composites.  #22885

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 0d02cf6..2138bca 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -5503,30 +5503,41 @@
 char *tdbType = findTypeForTable(database, parent, table, ctLookupName);
 return (tdbType && startsWithWord(type, tdbType));
 }
 
 boolean hIsBigBed(char *database, char *table, struct trackDb *parent, struct customTrack *(*ctLookupName)(char *table))
 /* Return TRUE if table corresponds to a bigBed file.
  * if table has no parent trackDb pass NULL for parent
  * If this is a custom track, pass in function ctLookupName(table) which looks up a
  * custom track by name, otherwise pass NULL
  */
 {
 return trackIsType(database, table, parent, "bigBed", ctLookupName) ||
     trackIsType(database, table, parent, "bigMaf", ctLookupName);
 }
 
+boolean hIsBigWig(char *database, char *table, struct trackDb *parent, struct customTrack *(*ctLookupName)(char *table))
+/* Return TRUE if table corresponds to a bigWig file.
+ * if table has no parent trackDb pass NULL for parent
+ * If this is a custom track, pass in function ctLookupName(table) which looks up a
+ * custom track by name, otherwise pass NULL
+ */
+{
+return trackIsType(database, table, parent, "bigWig", ctLookupName) ||
+    trackIsType(database, table, parent, "mathWig", ctLookupName);
+}
+
 static char *bbiNameFromTableChrom(struct sqlConnection *conn, char *table, char *seqName)
 /* Return file name from table.  If table has a seqName column, then grab the
  * row associated with chrom (which can be e.g. '1' not 'chr1' if that is the
  * case in the big remote file), or return NULL if there's no file for that particular
  * chrom (like a random or hap). */
 {
 boolean checkSeqName = (sqlFieldIndex(conn, table, "seqName") >= 0);
 if (checkSeqName && seqName == NULL)
     errAbort("bbiNameFromTableChrom: table %s has seqName column, but NULL seqName passed in",
 	     table);
 char query[512];
 if (checkSeqName)
     sqlSafef(query, sizeof(query), "select fileName from %s where seqName = '%s'",
 	  table, seqName);
 else