Index: src/hg/hgTracks/wigTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/wigTrack.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -b -B -U 4 -r1.91 -r1.92
--- src/hg/hgTracks/wigTrack.c	11 Jun 2009 19:52:31 -0000	1.91
+++ src/hg/hgTracks/wigTrack.c	4 Sep 2009 23:45:28 -0000	1.92
@@ -669,9 +669,9 @@
     int width, enum wiggleScaleOptEnum autoScale,
     double *overallUpperLimit, double *overallLowerLimit,
     double *graphUpperLimit, double *graphLowerLimit,
     double *overallRange, double *epsilon, int lineHeight,
-    double maxY, double minY)
+    double maxY, double minY, enum wiggleAlwaysZeroEnum alwaysZero)
 /*	if autoScaling, scan preDraw array and determine limits */
 {
 double graphRange;
 
@@ -692,8 +692,15 @@
 	    if (preDraw[i].smooth < *overallLowerLimit)
 		*overallLowerLimit = preDraw[i].smooth;
 	    }
 	}
+    if (alwaysZero == 0)
+	{
+	if ( *overallUpperLimit < 0)
+	    *overallUpperLimit = 0.0;
+	else if ( *overallLowerLimit > 0)
+	    *overallLowerLimit = 0.0;
+	}
     *overallRange = *overallUpperLimit - *overallLowerLimit;
     if (*overallRange == 0.0)
 	{
 	if (*overallUpperLimit > 0.0)
@@ -1050,9 +1057,9 @@
     wigCart->autoScale,
     &overallUpperLimit, &overallLowerLimit,
     &graphUpperLimit, &graphLowerLimit,
     &overallRange, &epsilon, tg->lineHeight,
-    wigCart->maxY, wigCart->minY);
+    wigCart->maxY, wigCart->minY, wigCart->alwaysZero);
 
 
 colorArray = allocColorArray(preDraw, width, preDrawZero,
     wigCart->colorTrack, tg, hvg);
@@ -1416,8 +1423,9 @@
 wigFetchMinMaxPixelsWithCart(cart,tdb,tdb->tableName, &minHeight, &maxHeight, &defaultHeight);
 wigFetchYLineMarkValueWithCart(cart,tdb,tdb->tableName, &yLineMark);
 wigCart->yLineMark = yLineMark;
 wigCart->yLineOnOff = wigFetchYLineMarkWithCart(cart,tdb,tdb->tableName, (char **) NULL);
+wigCart->alwaysZero = wigFetchAlwaysZeroWithCart(cart,tdb,tdb->tableName, (char **) NULL);
 
 wigCart->maxHeight = maxHeight;
 wigCart->defaultHeight = defaultHeight;
 wigCart->minHeight = minHeight;

