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

1.82 2010/05/07 05:40:58 jsanborn
fixed bugs
Index: src/hg/instinct/hgHeatmap2/drawingCode.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgHeatmap2/drawingCode.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -b -B -U 4 -r1.81 -r1.82
--- src/hg/instinct/hgHeatmap2/drawingCode.c	6 May 2010 18:42:50 -0000	1.81
+++ src/hg/instinct/hgHeatmap2/drawingCode.c	7 May 2010 05:40:58 -0000	1.82
@@ -1235,9 +1236,9 @@
 	}
     }
 nCols=1;
 
-struct slInt *si, *siList;
+struct slInt *si, *siList = NULL;
 struct slName *id, *idList = NULL;
 for (sl = gh->sampleList; sl ; sl = sl->next)
     {
     int orderId = hashIntValDefault(gh->sampleOrder, sl->name, -1);
@@ -1317,10 +1319,9 @@
 	}
     else    /* single color */
 	colorScale = COLOR_SCALE / (maxVal - minVal);
 
-
-    struct slName *sv, *id, *valList = col->cellValList(col, idList, conn);
+    struct slName *sv, *valList = col->cellValList(col, idList, conn);
 
     if (!valList || slCount(valList) != slCount(siList))
 	continue;
 
@@ -1339,11 +1341,8 @@
 
 	if (orderId == -1)
 	    continue;
 
-	//id = slNameNew(getId(conn, labTable, key, sl->name, value));      
-	//char *cellVal = col->cellVal(col, id, conn);
-
 	if (output)
 	    {
 	    if (cellVal)
 		{
@@ -1399,9 +1398,8 @@
 	    
 	int y = chromY + orderId * h;
 	
 	vgBox(vg, chromX, y, width, h, valCol);
-	freez(&id);
 	}
     slNameFreeList(&valList);
     
     vgUnclip(vg);
@@ -1611,9 +1609,9 @@
     else    /* single color */
 	colorScale = COLOR_SCALE / (maxVal - minVal);
     
     struct hmPixel *hm, *hmList = NULL;
-    struct slName *sv, *id, *valList = col->cellValList(col, idList, conn);
+    struct slName *sv, *valList = col->cellValList(col, idList, conn);
     
     if (!valList || slCount(valList) != slCount(siList))
 	continue;
    
@@ -1675,9 +1673,8 @@
 	hm->w = width;
 	hm->h = ceil(h);
 	hm->color = valCol;
 	slAddHead(&hmList, hm);
-	freez(&id);
 	}
 
     /* Sort column by value */
     slSort(&hmList, hmPixelCmpVal);