bb7c285d51eabd45fe7fbb3ae297acd0324915b7
kent
  Tue Apr 19 15:09:50 2011 -0700
Refactoring in hopes of making auto-scale work as you'd hope with multiwigs.  That still isn't there, this is just preliminaries.
diff --git src/hg/inc/wiggle.h src/hg/inc/wiggle.h
index f419d8f..0ccc92f 100644
--- src/hg/inc/wiggle.h
+++ src/hg/inc/wiggle.h
@@ -232,59 +232,66 @@
         wigFetchSmoothingWindowWithCart(cart,(tdb),(tdb)->track,(optString))
 /* return smoothing window size N: [0:16]   */
 
 extern enum wiggleYLineMarkEnum wigFetchYLineMarkWithCart(struct cart *cart,
     struct trackDb *tdb, char *name, char **optString);
 #define wigFetchYLineMark(tdb,optString) \
         wigFetchYLineMarkWithCart(cart,(tdb),(tdb)->track,(optString))
 /* return On/Off status of y= line marker   */
 
 extern void wigFetchYLineMarkValueWithCart(struct cart *cart,struct trackDb *tdb,
     char *name, double *tDbYMark );
 #define wigFetchYLineMarkValue(tdb,tDbYMark) \
         wigFetchYLineMarkValueWithCart(cart,(tdb),(tdb)->track,(tDbYMark))
 /* return value for the y line marker to be drawn   */
 
+char *wigFetchAggregateValWithCart(struct cart *cart, struct trackDb *tdb);
+/* Return aggregate value for track. */
+
+boolean wigIsOverlayTypeAggregate(char *aggregate);
+/* Return TRUE if aggregater type is one of the overlay ones. */
+
 int *wiggleSpanList(struct sqlConnection *conn, struct trackDb *tdb);
 /******	spanList - fetch list of spans from trackDb *********************/
 
 /*	cart and trackDb strings	*/
 #define VIEWLIMITS "viewLimits"
 #define DEFAULTVIEWLIMITS "defaultViewLimits"
 #define VIEWLIMITSMAX "viewLimitsMax"
 #define MIN_Y "minY"
 #define MAX_Y "maxY"
 #define MIN_LIMIT "minLimit"
 #define MAX_LIMIT "maxLimit"
 #define MAXHEIGHTPIXELS "maxHeightPixels"
 #define HEIGHTPER "heightPer"
 #define HORIZGRID "horizGrid"
 #define GRIDDEFAULT "gridDefault"
 #define TRANSFORMFUNC "transformFunc"
 #define ALWAYSZERO "alwaysZero"
 #define AUTOSCALE "autoScale"
 #define AUTOSCALEDEFAULT "autoScaleDefault"
 #define LINEBAR "lineBar"
 #define AGGREGATE "aggregate"
 #define GRAPHTYPE "graphType"
 #define GRAPHTYPEDEFAULT "graphTypeDefault"
 #define WINDOWINGFUNCTION "windowingFunction"
 #define SMOOTHINGWINDOW "smoothingWindow"
 #define YLINEONOFF "yLineOnOff"
 #define YLINEMARK "yLineMark"
 #define SPANLIST "spanList"
 #define	MAX_SPAN_COUNT	128
+#define MAX_SMOOTHING 16
 
 /*	compute the data value give the bin	*/
 /*
 #define BIN_TO_VALUE(bin,lowerLimit,range) ((range > 0.0) ? \
 	lowerLimit+((double)bin/(double)MAX_WIG_VALUE*range) : lowerLimit)
 */
 #define BIN_TO_VALUE(bin,lowerLimit,range) \
 	lowerLimit+(range*((double)bin/(double)MAX_WIG_VALUE))
 /*	This needs to be adjusted for data with positive and
  *	negative values, a special bin for 0 needs to be set aside and
  *	the positive and negative values kept separately
  */
 
 #if defined(DEBUG)	/*	dbg	*/
 extern void wigProfileEnter();