a8a2a5e4ce457bc3a0be2ff4c0bbf69c75e83528
braney
  Thu Feb 8 08:17:53 2018 -0800
fix bug is with line being drawn in wiggles even when value is NaN

diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c
index ee5714c..3fe0869 100644
--- src/hg/hgTracks/wigTrack.c
+++ src/hg/hgTracks/wigTrack.c
@@ -998,31 +998,31 @@
 			    y0 = (graphUpperLimit  - yOffsets[(numTrack-1) *  width + x1]) *scaleFactor;
 			    y1 = (graphUpperLimit - dataValue - yOffsets[(numTrack-1) *  width + x1])*scaleFactor;
 			    }
 			}
 
 		    int boxHeight = max(1,abs(y1 - y0));
 		    int boxTop = min(y1,y0);
 
 		    //	positive data value exactly equal to Bottom pixel
 		    //  make sure it draws at least a pixel there
 		    if (boxTop == h)
 			boxTop = h - 1;
 
 		    // negative data value exactly equal to top pixel
 		    // make sure it draws something
-		    if ((boxTop+boxHeight) == 0)
+		    if (((boxTop+boxHeight) == 0) && !isnan(dataValue))
 			boxHeight += 1;
 		    doLine(image,x, yOff+boxTop, boxHeight, drawColor);
 		    }
 		}
 	    else
 		{	/*	draw a 3 pixel height box	*/
 		if (whiskers)
 		    {
 		    int scaledMin = scaleHeightToPixels(doTransform(p->min, transformFunc));
 		    int scaledMax = scaleHeightToPixels(doTransform(p->max, transformFunc));
 		    double mean = p->sumData/p->count;
 		    int boxHeight = max(1,scaledMin - scaledMax);
 		    doLine(image, x, scaledMax, boxHeight, lightColor);
 		    int scaledMean = scaleHeightToPixels(dataValue);
 		    double std = calcStdFromSums(p->sumData, p->sumSquares, p->count);