src/hg/instinct/hgHeatmap2/drawingCode.c 1.71

1.71 2009/09/11 23:15:42 jsanborn
fixed off-by-one error in heatmap display
Index: src/hg/instinct/hgHeatmap2/drawingCode.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgHeatmap2/drawingCode.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -b -B -U 4 -r1.70 -r1.71
--- src/hg/instinct/hgHeatmap2/drawingCode.c	19 Aug 2009 23:00:18 -0000	1.70
+++ src/hg/instinct/hgHeatmap2/drawingCode.c	11 Sep 2009 23:15:42 -0000	1.71
@@ -2522,10 +2522,10 @@
 
     int chromX = hEl->pixelStart; 
     for(nb = ghBed; nb; nb = nb->next)
 	{
-	start = nb->chromStart;
-	end = nb->chromEnd;
+	start = nb->chromStart + 1;  // to fix off-by-one error
+	end = nb->chromEnd + 1;      // to fix off-by-one error
 
 	/* Window overlaps a probe */
 	if (start < hEl->baseStart) 
 	    start = hEl->baseStart;
@@ -2622,10 +2622,10 @@
 
     int chromX = hEl->pixelStart; 
     for(nb = ghBed; nb; nb = nb->next)
 	{
-	start = nb->chromStart;
-	end = nb->chromEnd;
+	start = nb->chromStart + 1;  // to fix off-by-one error
+	end = nb->chromEnd + 1;      // to fix off-by-one error
 
 	/* Window overlaps a probe */
 	if (start < hEl->baseStart) 
 	    start = hEl->baseStart;
@@ -2766,10 +2766,10 @@
     vgBox(vg, chromX, chromY, width, totalHeight, color);
 
     for(nb = ghBed; nb; nb = nb->next)
 	{
-	start = nb->chromStart;
-	end = nb->chromEnd;
+	start = nb->chromStart + 1;   // to fix off-by-one error
+	end = nb->chromEnd + 1;       // to fix off-by-one error
 
 	/* Window overlaps a probe */
 	if (start < hEl->baseStart) 
 	    start = hEl->baseStart;