src/hg/instinct/bioInt2/bioIntUI.c 1.9
1.9 2009/03/31 22:32:34 jsanborn
updated
Index: src/hg/instinct/bioInt2/bioIntUI.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioIntUI.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 4 -r1.8 -r1.9
--- src/hg/instinct/bioInt2/bioIntUI.c 31 Mar 2009 20:36:50 -0000 1.8
+++ src/hg/instinct/bioInt2/bioIntUI.c 31 Mar 2009 22:32:34 -0000 1.9
@@ -374,8 +374,10 @@
dyStringPrintf(dy, ")");
char *query = dyStringCannibalize(&dy);
jsonAddString(js, "description", fe->longLabel);
+jsonAddString(js, "name", fe->name);
+jsonAddString(js, "source", "N/A");
struct json *data = jsonAddContainer(js, "data");
struct sqlResult *sr = sqlGetResult(conn, query);
char **row = NULL;
@@ -581,21 +583,15 @@
int cohort_id = cartUsualInt(cart, bioIntCohortId, -1);
if (cohort_id == -1)
cohort_id = 1; // hard code for first analysis during testing!
-int feature_id = cartUsualInt(cart, bioIntFeatureId, -1);
char *feature_name = cartOptionalString(cart, bioIntFeatureName);
-if (!feature_name && feature_id == -1)
+if (!feature_name)
errAbort("%s or %s must be set for mode=getMostCorrelated\n", bioIntFeature, bioIntFeatureId);
struct sqlConnection *conn = hAllocConnProfile(localDb, db);
-struct analysisFeatures *af = NULL;
-if (feature_id == -1)
- af = getAnalysisFeaturesByName(conn, feature_name);
-else
- af = getAnalysisFeaturesById(conn, feature_id);
-
+struct analysisFeatures *af = getAnalysisFeaturesByName(conn, feature_name);
if (!af)
{
hFreeConn(&conn);
errAbort("Could not find analysisFeature in db");