12431b42d1616cb02adead491a305b8dc163ca71
kate
  Mon Mar 28 11:59:03 2016 -0700
Add support for filter on score.  Show total median expression (from which score is computed) on details page. refs #15645

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index d7e10a4..ded0379 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -759,33 +759,40 @@
 /* Draw generic item list.  Features must be fixed height
  * and tg->drawItemAt has to be filled in. */
 
 void bedDrawSimpleAt(struct track *tg, void *item,
                      struct hvGfx *hvg, int xOff, int y,
                      double scale, MgFont *font, Color color, enum trackVisibility vis);
 /* Draw a single simple bed item at position. */
 
 void bedDrawSimple(struct track *tg, int seqStart, int seqEnd,
         struct hvGfx *hvg, int xOff, int yOff, int width,
         MgFont *font, Color color, enum trackVisibility vis);
 /* Draw simple Bed items. */
 
 typedef struct slList *(*ItemLoader)(char **row);
 
+void bedLoadItemByQueryWhere(struct track *tg, char *table, char *query,  
+                                char *extraWhere, ItemLoader loader);
+/* Generic itg->item loader, adding extra clause to hgRangeQuery if query is NULL 
+ * and extraWhere is not NULL. */
+
 void bedLoadItemByQuery(struct track *tg, char *table, char *query, ItemLoader loader);
-/* Generic tg->item loader. If query is NULL use generic
- hRangeQuery(). */
+/* Generic tg->item loader. If query is NULL use generic hRangeQuery(). */
+
+void bedLoadItemWhere(struct track *tg, char *table, char *extraWhere, ItemLoader loader);
+/* Generic tg->item loader, adding extra clause to hgRangeQuery. */
 
 void bedLoadItem(struct track *tg, char *table, ItemLoader loader);
 /* Generic tg->item loader. */
 
 boolean simpleBedNextPrevEdge(struct track *tg, struct hvGfx *hvg, void *item, int x, int y, int w,
 			   int h, boolean next);
 /* Like linkedFeaturesNextPrevItem, but for simple bed which has no block structure so
  * this simply zaps us to the right/left edge of the feature.  Arrows have already been
  * drawn; here we figure out coords and draw a mapBox. */
 
 void loadLinkedFeaturesWithLoaders(struct track *tg, struct slList *(*itemLoader)(char **row),
 				   struct linkedFeatures *(*lfFromWhatever)(struct slList *item),
 				   char *scoreColumn, char *moreWhere,
                                    boolean (*itemFilter)(struct slList *item));
 /* Make a linkedFeatures loader by providing three functions: (1) a regular */