dff3f2a22bb375a6ec0eb38ab29b8bdc1e0de9d2
braney
  Thu May 9 11:47:45 2019 -0700
fix filters on bigBeds with over 32 fields.  Fix justification of dense
left label on gdcCancer track

diff --git src/hg/hgTracks/lollyTrack.c src/hg/hgTracks/lollyTrack.c
index 0328707..ca821b2 100644
--- src/hg/hgTracks/lollyTrack.c
+++ src/hg/hgTracks/lollyTrack.c
@@ -83,31 +83,31 @@
                           tg->track, pop->name, pop->name, NULL, TRUE, NULL);
     }
 }
 
 void lollyLeftLabels(struct track *tg, int seqStart, int seqEnd,
 	struct hvGfx *hvg, int xOff, int yOff, int width, int height,
 	boolean withCenterLabels, MgFont *font, Color color,
 	enum trackVisibility vis)
 // draw the labels on the left margin
 {
 struct lollyCartOptions *lollyCart = tg->lollyCart;
 int fontHeight = tl.fontHeight+1;
 int centerLabel = (height/2)-(fontHeight/2);
 if ( tg->visibility == tvDense)
     {
-    hvGfxText(hvg, xOff, yOff+fontHeight, color, font, tg->shortLabel);
+    hvGfxTextRight(hvg, xOff, yOff+fontHeight, width - 1, fontHeight,  color, font, tg->shortLabel);
     return;
     }
 
 hvGfxText(hvg, xOff, yOff+centerLabel, color, font, tg->shortLabel);
 
 if (isnan(lollyCart->upperLimit))
     {
     hvGfxTextRight(hvg, xOff, yOff + LOLLY_DIAMETER, width - 1, fontHeight, color,
         font, "NO DATA");
     return;
     }
 
 char upper[1024];
 safef(upper, sizeof(upper), "%g -",   lollyCart->upperLimit);
 hvGfxTextRight(hvg, xOff, yOff + LOLLY_DIAMETER, width - 1, fontHeight, color,
@@ -119,34 +119,31 @@
     hvGfxTextRight(hvg, xOff, yOff+height-fontHeight - LOLLY_DIAMETER, width - 1, fontHeight,
         color, font, lower);
     }
 }
 
 
 static int lollyHeight(struct track *tg, enum trackVisibility vis)
 /* calculate height of all the lollys being displayed */
 {
 if ( tg->visibility == tvDense)
     return  tl.fontHeight;
 
 // if we're pack, then use bigBed drawing
 if (tg->visibility == tvPack)
     {
-    char *ourWords[2];
-    ourWords[0] = "bigBed";
-    ourWords[1] = "4";
-    bigBedMethods(tg, tg->tdb,2,ourWords);
+    bigBedMethods(tg, tg->tdb, tg->lollyCart->wordCount, tg->lollyCart->words);
     tg->mapsSelf = FALSE;
     tg->drawLeftLabels = NULL;
     return tg->totalHeight(tg, vis);
     }
 
 // return the height we calculated at load time
 return tg->lollyCart->height;
 }
 
 #ifdef NOTUSED
 double calcVarianceFromSums(double sum, double sumSquares, bits64 n)
 /* Calculate variance. */
 {   
 double var = sumSquares - sum*sum/n;
 if (n > 1)
@@ -309,28 +306,27 @@
 double tDbMinY;     /*  data range limits from trackDb type line */
 double tDbMaxY;     /*  data range limits from trackDb type line */
 char *trackWords[8];     /*  to parse the trackDb type line  */
 int trackWordCount = 0;  /*  to parse the trackDb type line  */
 wigFetchMinMaxYWithCart(cart, tdb, tdb->track, &lollyCart->minY, &lollyCart->maxY, &tDbMinY, &tDbMaxY, trackWordCount, trackWords);
 lollyCart->upperLimit = lollyCart->maxY;
 lollyCart->lowerLimit = lollyCart->minY;
 
 return lollyCart;
 }
 
 void lollyMethods(struct track *track, struct trackDb *tdb, 
                                 int wordCount, char *words[])
 /* bigLolly track type methods */
 {
-char *ourWords[2];
-ourWords[0] = "bigBed";
-ourWords[1] = "4";
-bigBedMethods(track, tdb,2,ourWords);
+bigBedMethods(track, tdb, wordCount, words);
 
 struct lollyCartOptions *lollyCart = lollyCartOptionsNew(cart, tdb, wordCount, words);
 lollyCart->radius = 5;
+lollyCart->words = words;
+lollyCart->wordCount = wordCount;
 track->loadItems = lollyLoadItems;
 track->drawItems = lollyDrawItems;
 track->totalHeight = lollyHeight; 
 track->drawLeftLabels = lollyLeftLabels;
 track->lollyCart = lollyCart;
 }