9cc2351f465f585965408ff48fea2ad79a1aaa91
markd
  Mon Jun 6 17:40:11 2011 -0700
meger of GENCODE V7 tracks
diff --git src/hg/inc/hui.h src/hg/inc/hui.h
index ac0ba82..ee48f7f 100644
--- src/hg/inc/hui.h
+++ src/hg/inc/hui.h
@@ -637,30 +637,38 @@
 /* Drawing mode per-track cart variable suffix: */
 #define BASE_COLOR_VAR_SUFFIX "baseColorDrawOpt"
 #define CODON_NUMBERING_SUFFIX "codonNumbering"
 
 /* trackDb settings: */
 #define BASE_COLOR_USE_CDS "baseColorUseCds"
 #define BASE_COLOR_USE_SEQUENCE "baseColorUseSequence"
 #define BASE_COLOR_DEFAULT "baseColorDefault"
 #define SHOW_DIFF_BASES_ALL_SCALES "showDiffBasesAllScales"
 
 /* Coloring help pages: */
 #define CDS_HELP_PAGE "../goldenPath/help/hgCodonColoring.html"
 #define CDS_MRNA_HELP_PAGE "../goldenPath/help/hgCodonColoringMrna.html"
 #define CDS_BASE_HELP_PAGE "../goldenPath/help/hgBaseLabel.html"
 
+/* Settings for coloring and filtering genePred tables from an item class table. */
+#define GENEPRED_CLASS_VAR "geneClasses"
+#define GENEPRED_CLASS_PREFIX "gClass_"
+#define GENEPRED_CLASS_TBL "itemClassTbl"
+#define GENEPRED_CLASS_NAME_COLUMN "itemClassNameColumn"
+#define GENEPRED_CLASS_NAME_COLUMN_DEFAULT "name"
+#define GENEPRED_CLASS_CLASS_COLUMN "itemClassClassColumn"
+#define GENEPRED_CLASS_CLASS_COLUMN_DEFAULT "class"
 
 void baseColorDrawOptDropDown(struct cart *cart, struct trackDb *tdb);
 /* Make appropriately labeled drop down of options if any are applicable.*/
 
 enum baseColorDrawOpt baseColorDrawOptEnabled(struct cart *cart,
 					      struct trackDb *tdb);
 /* Query cart & trackDb to determine what drawing mode (if any) is enabled. */
 
 /*** Other Gene Prediction type options: ***/
 #define HIDE_NONCODING_SUFFIX "hideNoncoding"
 #define HIDE_NONCODING_DEFAULT FALSE
 
 /*** Control of fancy indel display code: ***/
 
 /* trackDb settings: */
@@ -1142,30 +1150,33 @@
     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, boolean onOneLine);
 /* Does the UI for a list of filterBy structure */
 
+char *filterByClause(filterBy_t *filterBy);
+/* returns the SQL where clause for a single filterBy struct */
+
 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);
 // Make a table schema link (if appropriate and then returns TRUE)