b00cc1bf7adf212d1797215e64ef636b37303087 braney Wed Apr 17 13:57:40 2019 -0700 do a little bounds checking on the data in lollipops diff --git src/hg/hgTracks/lolly.c src/hg/hgTracks/lolly.c index f0a5c7d..ccbd7cd 100644 --- src/hg/hgTracks/lolly.c +++ src/hg/hgTracks/lolly.c @@ -153,30 +153,33 @@ int trackHeight = tg->lollyCart->height; struct bigBedFilter *filters = bigBedBuildFilters(cart, bbi, tg->tdb); for (bb = bbList; bb != NULL; bb = bb->next) { bigBedIntervalToRow(bb, chromName, startBuf, endBuf, bedRow, ArraySize(bedRow)); if (!bigBedFilterInterval(bedRow, filters)) continue; double val = atof(bedRow[lollyField - 1]); if (!((lollyCart->autoScale == wiggleScaleAuto) || ((val >= lollyCart->minY) && (val <= lollyCart->maxY) ))) continue; + if (atoi(bedRow[1]) < winStart) + continue; + AllocVar(pop); slAddHead(&popList, pop); pop->val = val; pop->start = atoi(bedRow[1]); pop->end = atoi(bedRow[2]); pop->name = cloneString(bedRow[3]); count++; sumData += val; sumSquares += val * val; if (val > maxVal) maxVal = val; if (val < minVal) minVal = val; }