src/hg/instinct/hgHeatmap2/hgHeatmap2.c 1.77
1.77 2009/08/21 22:24:01 jzhu
add patient id to tooltip
Index: src/hg/instinct/hgHeatmap2/hgHeatmap2.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgHeatmap2/hgHeatmap2.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -b -B -U 4 -r1.76 -r1.77
--- src/hg/instinct/hgHeatmap2/hgHeatmap2.c 4 Jun 2009 03:50:37 -0000 1.76
+++ src/hg/instinct/hgHeatmap2/hgHeatmap2.c 21 Aug 2009 22:24:01 -0000 1.77
@@ -1037,9 +1037,9 @@
getStatsFxn(statsFxn, &func, &colorCutoff);
if (differentWord(gh->dataType, "bed 15") || !gotAdvFilter(gh->patDb) || !func)
return;
-//get the analysis results
+
char *raName= gh->raFile;
struct sqlConnection *conn = hAllocConnProfile(heatMapDbProfile, gh->database);
struct heatmapLay *hl = genesetLayout(gh, geneSetNames, width, sampleHeight);
@@ -2198,14 +2199,22 @@
}
else
jsonWarnAbort("Tooltip query ill-defined.");
+char *patient = NULL;
+patient= toolTipByPatient(gh, sampleId);
+
struct json *js = newJson();
if (val)
jsonAddString(js, "value", val);
else
jsonAddString(js, "value", "N/A");
+if (patient)
+ jsonAddString(js, "patient", patient);
+else
+ jsonAddString(js, "value", "N/A");
+
hPrintf("%s", js->print(js));
}