src/hg/instinct/lib/hgHeatmapLib.c 1.58
1.58 2009/05/06 21:20:13 sbenz
Added platform and platform type for genesets
Index: src/hg/instinct/lib/hgHeatmapLib.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/lib/hgHeatmapLib.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -b -B -U 4 -r1.57 -r1.58
--- src/hg/instinct/lib/hgHeatmapLib.c 6 May 2009 00:05:26 -0000 1.57
+++ src/hg/instinct/lib/hgHeatmapLib.c 6 May 2009 21:20:13 -0000 1.58
@@ -99,16 +99,31 @@
gh->patTable = NULL;
gh->patField = NULL;
gh->sampleField = NULL;
-/* Settings on gene sets from datasets.ra file */
-gh->probeTable = NULL;
-
gh->displayNameTable = NULL;
-gh->platform = cloneString("expression");
struct hash *tdbHash = trackDbHashSettings(tdb);
+gh->platform = cloneString("expression");
+if(hashFindVal(tdbHash, "platformType"))
+ gh->platform = (char *)(hashFindVal(tdbHash, "platformType"));
+
+// probe table
+if (hashFindVal(tdbHash, "platform"))
+{
+ struct sqlConnection *conn = hAllocConnProfile(heatMapDbProfile, gh->database);
+
+ /* Settings on gene sets from datasets.ra file */
+ gh->probeTable =(char *)(hashFindVal(tdbHash, "platform"));
+ if (!sqlTableExists(conn, gh->probeTable))
+ gh->probeTable= NULL;
+
+ hFreeConn(&conn);
+}
+else
+ gh->probeTable = NULL;
+
gh->expScale = 0;
gh->gainFull = 1.0;
gh->gainSet = 1.0;
gh->height = 0;
@@ -1133,9 +1148,9 @@
tableName, probeTable, tableName, probeTable,
probeTable, geneList);
}
-struct sqlConnection *conn = hAllocConnProfile(heatMapDbProfile, database);
+struct sqlConnection *conn = hAllocConnProfile(heatMapDbProfile, geneDb);
struct sqlResult *sr = sqlGetResult(conn, query);
struct bed *tuple = NULL;
if (!(*geneHash))