src/hg/lib/hui.c 1.285
1.285 2010/05/13 21:38:33 kent
Adding stuff for aggregate/overlay dropdown.
Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.284
retrieving revision 1.285
diff -b -B -U 4 -r1.284 -r1.285
--- src/hg/lib/hui.c 11 May 2010 01:43:30 -0000 1.284
+++ src/hg/lib/hui.c 13 May 2010 21:38:33 -0000 1.285
@@ -1402,8 +1402,33 @@
cgiMakeDropList(var, wiggleGraphOptions, ArraySize(wiggleGraphOptions),
curVal);
}
+static char *aggregateLabels[] =
+ {
+ "none",
+ "transparent overlay",
+ "solid overlay",
+ "sum",
+ "product",
+ };
+
+static char *aggregateValues[] =
+ {
+ WIG_AGGREGATE_NONE,
+ WIG_AGGREGATE_TRANSPARENT,
+ WIG_AGGREGATE_SOLID,
+ WIG_AGGREGATE_SUM,
+ WIG_AGGREGATE_PRODUCT,
+ };
+
+void aggregateDropDown(char *var, char *curVal)
+/* Make drop down menu for aggregate strategy */
+{
+cgiMakeDropListFull(var, aggregateLabels, aggregateValues,
+ ArraySize(aggregateValues), curVal, NULL);
+}
+
static char *wiggleTransformFuncOptions[] = {
"NONE",
"LOG"
};
@@ -3689,8 +3714,18 @@
wigFetchYLineMarkValueWithCart(cart,tdb,name, &yLineMark);
printf("<TABLE BORDER=0>");
+char *aggregate = trackDbSetting(tdb, "aggregate");
+if (aggregate != NULL && tdb->subtracks)
+ {
+ char *aggregateVal = cartOrTdbString(cart, tdb, "aggregate", NULL);
+ printf("<TR valign=center><th align=right>Aggregation method:</th><td align=left>");
+ safef(option, sizeof(option), "%s.%s", name, AGGREGATE);
+ aggregateDropDown(option, aggregateVal);
+ puts("</td></TR>");
+ }
+
printf("<TR valign=center><th align=right>Type of graph:</th><td align=left>");
snprintf( option, sizeof(option), "%s.%s", name, LINEBAR );
wiggleGraphDropDown(option, lineBar);
if(boxed)