1090940912927feb932d11ad5fdefe1a80fffc6b
braney
  Sun Jun 1 15:23:20 2014 -0700
add Watson Cricket mode
diff --git src/hg/hgTracks/wigCommon.h src/hg/hgTracks/wigCommon.h
index e168143..8a38069 100644
--- src/hg/hgTracks/wigCommon.h
+++ src/hg/hgTracks/wigCommon.h
@@ -20,30 +20,31 @@
     enum wiggleSmoothingEnum smoothingWindow;	/*  N: [1:15] */
     enum wiggleYLineMarkEnum yLineOnOff;	/*  OFF/ON	*/
     enum wiggleAlwaysZeroEnum alwaysZero;	/*  OFF/ON	*/
     enum wiggleTransformFuncEnum transformFunc;	/*  NONE/LOG	*/
     double minY;	/*	from trackDb.ra words, the absolute minimum */
     double maxY;	/*	from trackDb.ra words, the absolute maximum */
     int maxHeight;	/*	maximum pixels height from trackDb	*/
     int defaultHeight;	/*	requested height from cart	*/
     int minHeight;	/*	minimum pixels height from trackDb	*/
     double yLineMark;	/*	user requested line at y = */
     char *colorTrack;   /*	Track to use for coloring wiggle track. */
     int graphColumn;	/*	column to be graphing (bedGraph tracks)	*/
     boolean bedGraph;	/*	is this a bedGraph track ?	*/
     boolean isMultiWig;	/*      If true it's a multi-wig. */
     enum wiggleAggregateFunctionEnum aggregateFunction;	/*  NONE/TRANSPARENT/STACKED	*/
+    boolean doNegative; /*      should we negate the values */
     };
 
 struct wigCartOptions *wigCartOptionsNew(struct cart *cart, struct trackDb *tdb, int wordCount, char *words[]);
 /* Create a wigCartOptions from cart contents and tdb. */
 
 struct preDrawContainer
 /* A preDraw array with a little bit of extra info */
     {
     struct preDrawContainer *nextPlaceholder;   /* Refactoring code so not in list really. */
     struct preDrawElement *preDraw;     /* Array of values. */
     int preDrawSize;		/* Size of preDraw */
     int preDrawZero;		/* Offset from start of predraw array to data requested.  We
                                  * get more because of smoothing */
     int width;			/* Passed in width, number of pixels to display without smooth */
     double graphUpperLimit, graphLowerLimit; /* limits to the smoothed value */
@@ -86,31 +87,32 @@
    };
 
 struct wigGraphOutput *wigGraphOutputStack(int xOff, int yOff, int width, int numTracks,  struct hvGfx *image);
 /* Get appropriate wigGraphOutput for non-transparent stacked rendering */
 
 struct wigGraphOutput *wigGraphOutputSolid(int xOff, int yOff, struct hvGfx *image);
 /* Get appropriate wigGraphOutput for non-transparent rendering */
 
 /*	source to these routines is in wigTrack.c	*/
 
 struct preDrawContainer *initPreDrawContainer(int width);
 /*	initialize a preDraw array of size width	*/
 
 void preDrawWindowFunction(struct preDrawElement *preDraw, int preDrawSize,
 	enum wiggleWindowingEnum windowingFunction,
-	enum wiggleTransformFuncEnum transformFunc);
+	enum wiggleTransformFuncEnum transformFunc,
+	boolean doNegative);
 /*	apply windowing function to the values in preDraw array	*/
 
 void preDrawSmoothing(struct preDrawElement *preDraw, int preDrawSize,
     enum wiggleSmoothingEnum smoothingWindow);
 /*	apply smoothing function to preDraw array	*/
 
 double preDrawLimits(struct preDrawElement *preDraw, int preDrawZero,
     int width, double *overallUpperLimit, double *overallLowerLimit);
 /*	scan preDraw array and determine graph limits */
 
 double preDrawAutoScale(struct preDrawElement *preDraw, int preDrawZero,
     int width, enum wiggleScaleOptEnum autoScale,
     enum wiggleWindowingEnum windowingFunction,
     double *graphUpperLimit, double *graphLowerLimit,
     double *epsilon, int lineHeight,