b9d13eb62cfbe9db24ce1925de9efbd099354354 tdreszer Fri Feb 4 17:01:22 2011 -0800 Added support for '*Filter' generic score filter logic to beds diff --git src/hg/inc/hui.h src/hg/inc/hui.h index 76ebbd9..d67730f 100644 --- src/hg/inc/hui.h +++ src/hg/inc/hui.h @@ -1023,30 +1023,43 @@ {filterName}Max: old trackDb value if {filterName}Limits not found defaultLimits: function param if no tdb limits settings found) The 'and' param and dyString in/out allows stringing multiple where clauses together */ struct dyString *dyAddFilterAsDouble(struct cart *cart, struct trackDb *tdb, struct dyString *extraWhere,char *filter,char *defaultLimits, char*field, boolean *and); /* creates the where clause condition to support numeric double filters. Filters are expected to follow {fiterName}: trackDb min or min:max - default value(s); {filterName}Min or {filterName}: min (user supplied) cart variable; {filterName}Max: max (user supplied) cart variable; {filterName}Limits: trackDb allowed range "0.0:10.0" Optional uses: defaultLimits: function param if no tdb limits settings found) The 'and' param allows stringing multiple where clauses together */ +#define ALL_SCORE_FILTERS_LOGIC +#ifdef ALL_SCORE_FILTERS_LOGIC +struct dyString *dyAddAllScoreFilters(struct cart *cart, struct trackDb *tdb, struct dyString *extraWhere,boolean *and); +/* creates the where clause condition to gather together all random double filters + Filters are expected to follow + {fiterName}: trackDb min or min:max - default value(s); + {filterName}Min or {filterName}: min (user supplied) cart variable; + {filterName}Max: max (user supplied) cart variable; + {filterName}Limits: trackDb allowed range "0.0:10.0" Optional + uses: defaultLimits: function param if no tdb limits settings found) + The 'and' param and dyString in/out allows stringing multiple where clauses together */ +#endif///def ALL_SCORE_FILTERS_LOGIC + void encodePeakCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed); /* Put up UI for filtering wgEnocde peaks based on score, Pval and Qval */ void genePredCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed); /* Put up genePred-specific controls */ void wigMafCfgUi(struct cart *cart, struct trackDb *tdb,char *name, char *title, boolean boxed, char *db); /* UI for maf/wiggle track */ void bamCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed); /* BAM: short-read-oriented alignment file format. */ boolean tdbSortPrioritiesFromCart(struct cart *cart, struct trackDb **tdbList); /* Updates the tdb->priority from cart then sorts the list anew. Returns TRUE if priorities obtained from cart */ @@ -1114,31 +1127,31 @@ boolean useIndex; // The returned values should be indexes boolean valueAndLabel; // If values list is value|label, then label is shown to the user struct slName *slValues; // Values that can be filtered on (All is always implied) struct slName *slChoices; // Values that have been chosen } filterBy_t; filterBy_t *filterBySetGet(struct trackDb *tdb, struct cart *cart, char *name); /* Gets one or more "filterBy" settings (ClosestToHome). returns NULL if not found */ void filterBySetFree(filterBy_t **filterBySet); /* Free a set of filterBy structs */ char *filterBySetClause(filterBy_t *filterBySet); /* returns the "column1 in (...) and column2 in (...)" clause for a set of filterBy structs */ -void filterBySetCfgUi(struct trackDb *tdb, filterBy_t *filterBySet); +void filterBySetCfgUi(struct trackDb *tdb, filterBy_t *filterBySet, boolean onOneLine); /* Does the UI for a list of filterBy structure */ struct dyString *dyAddFilterByClause(struct cart *cart, struct trackDb *tdb, struct dyString *extraWhere,char *column, boolean *and); /* creates the where clause condition to support a filterBy setting. Format: filterBy column:Title=value,value [column:Title=value|label,value|label,value|label]) filterBy filters are multiselect's so could have multiple values selected. thus returns the "column1 in (...) and column2 in (...)" clause. if 'column' is provided, and there are multiple filterBy columns, only the named column's clause is returned. The 'and' param and dyString in/out allows stringing multiple where clauses together */ boolean makeDownloadsLink(char *database, struct trackDb *tdb, struct hash *trackHash); // Make a downloads link (if appropriate and then returns TRUE) boolean makeSchemaLink(char *db,struct trackDb *tdb,char *label);