236814bc49d19c34bea7b90c7e879c64d2507cf7
angie
  Thu Aug 27 14:06:14 2015 -0700
If querying in a region, restrict wiggle values to the part of the region
that overlaps the primary item, don't just use the bounds of the db rows
that overlap start/end of region.
fixes #15952

diff --git src/lib/annoGrator.c src/lib/annoGrator.c
index 15a2396..c395b0d 100644
--- src/lib/annoGrator.c
+++ src/lib/annoGrator.c
@@ -226,30 +226,31 @@
 }
 
 static void agAddFilters(struct annoStreamer *vSelf, struct annoFilter *newFilters)
 /* Add filters and re-evaluate self->haveRJIncludeFilter. Apply filters to
  * own streamer interface and to internal source. */
 {
 annoStreamerAddFilters(vSelf, newFilters);
 struct annoGrator *self = (struct annoGrator *)vSelf;
 annoStreamerSetFilters(self->mySource, vSelf->filters);
 self->haveRJIncludeFilter = filtersHaveRJInclude(vSelf->filters);
 }
 
 void annoGratorSetRegion(struct annoStreamer *vSelf, char *chrom, uint rStart, uint rEnd)
 /* Set genomic region for query, and reset internal state. */
 {
+annoStreamerSetRegion(vSelf, chrom, rStart, rEnd);
 struct annoGrator *self = (struct annoGrator *)vSelf;
 self->mySource->setRegion((struct annoStreamer *)(self->mySource), chrom, rStart, rEnd);
 agReset(self);
 }
 
 static void agSetAutoSqlObject(struct annoStreamer *sSelf, struct asObject *asObj)
 /* Use new asObj and update internal state derived from asObj. */
 {
 struct annoGrator *gSelf = (struct annoGrator *)sSelf;
 annoStreamerSetAutoSqlObject(sSelf, asObj);
 gSelf->haveRJIncludeFilter = filtersHaveRJInclude(sSelf->filters);
 }
 
 void agSetOverlapRule(struct annoGrator *self, enum annoGratorOverlap rule)
 /* Tell annoGrator how to handle overlap of its rows with primary row. */