b5d34fef6610916dc89c85f83c0e1f719f6969c3
kate
  Mon Aug 31 20:13:15 2020 -0700
Add support for mouseOver (pattern) trackDb setting (initially to bigLolly). refs #26160

diff --git src/lib/bigBed.c src/lib/bigBed.c
index e39afd8..b09326a 100644
--- src/lib/bigBed.c
+++ src/lib/bigBed.c
@@ -520,30 +520,47 @@
 }
 
 struct asObject *bigBedFileAsObjOrDefault(char *fileName)
 // Get asObject associated with bigBed file, or the default.
 {
 struct bbiFile *bbi = bigBedFileOpen(fileName);
 if (bbi)
     {
     struct asObject *as = bigBedAsOrDefault(bbi);
     bbiFileClose(&bbi);
     return as;
     }
 return NULL;
 }
 
+struct slName *bbFieldNames(struct bbiFile *bbi)
+/* Get list of fields in bigBed */
+{
+if (!bbi)
+    return NULL;
+struct asObject *as = bigBedAs(bbi);
+if (!as)
+    return NULL;
+struct asColumn *col;
+struct slName *colNames = NULL;
+for (col = as->columnList; col; col = col->next)
+    slNameAddHead(&colNames, col->name);
+asObjectFree(&as);
+slReverse(&colNames);
+return colNames;
+}
+
 int bbFieldIndex(struct bbiFile *bbi, char* fieldName)
 /* return the index of a given field */
 {
 if (fieldName==NULL)
     return -1;
 struct asObject *as = bigBedAsOrDefault(bbi);
 if (as == NULL)
     return -1;
 
 // search for field name, return index if found
 struct asColumn *col = as->columnList;
 int ix = 0;
 for (;col != NULL;col=col->next, ix+=1)
     if (sameString(col->name, fieldName))
         return ix;