a47364d48ccd5b8ee8cdf7b47b7ba9edcfd66f1f braney Wed Apr 16 10:58:32 2014 -0700 fix a crashing bug in hgCustom if the description field is empty on anassembly hub diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 36a7424..3278fdf 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -1618,39 +1618,56 @@ { return wiggleGraphOptions[x]; } void wiggleGraphDropDown(char *var, char *curVal) /* Make drop down of options. */ { cgiMakeDropList(var, wiggleGraphOptions, ArraySize(wiggleGraphOptions), curVal); } static char *aggregateLabels[] = { "none", "transparent", "solid", + "stacked", }; static char *aggregateValues[] = { WIG_AGGREGATE_NONE, WIG_AGGREGATE_TRANSPARENT, WIG_AGGREGATE_SOLID, + WIG_AGGREGATE_STACKED, }; +char *wiggleAggregateFunctionEnumToString(enum wiggleAggregateFunctionEnum x) +/* Convert from enum to string representation. */ +{ +return aggregateValues[x]; +} + +enum wiggleAggregateFunctionEnum wiggleAggregateFunctionStringToEnum(char *string) +/* Convert from string to enum representation. */ +{ +int x = stringIx(string, aggregateValues); +if (x < 0) + errAbort("hui::wiggleAggregateFunctionStringToEnum() - Unknown option %s", string); +return x; +} + 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" }; static char *wiggleTransformFuncLabels[] = { "NONE", "LOG (ln(1+x))"