b94049706947c8eeaa56aa8593a74940fdfd544f
kate
  Thu Feb 12 15:22:25 2015 -0800
Use controlledVocabulary setting for non-ENCODE (table-based) vocabularies (replace briefly used *MetaTables settings)

diff --git src/hg/inc/hui.h src/hg/inc/hui.h
index 23260cc..ca9c967 100644
--- src/hg/inc/hui.h
+++ src/hg/inc/hui.h
@@ -930,35 +930,35 @@
 void hCompositeUi(char *db, struct cart *cart, struct trackDb *tdb,
 		  char *primarySubtrack, char *fakeSubmit, char *formName);
 /* UI for composite tracks: subtrack selection.  If primarySubtrack is
  * non-NULL, don't allow it to be cleared and only offer subtracks
  * that have the same type.  If fakeSubmit is non-NULL, add a hidden
  * var with that name so it looks like it was pressed. */
 
 char *compositeGroupLabel(struct trackDb *childTdb, char *group, char *id);
 /* Given ID from group, return corresponding label,  looking through parent's subGroupN's */
 
 char *compositeGroupId(struct trackDb *tdb, char *group, char *id);
 /* Given label, return id,  looking through parent's subGroupN's */
 
 char *compositeLabelWithVocabLink(char *db,struct trackDb *parentTdb, struct trackDb *childTdb,
 	char *vocabType, char *label);
-/* If the parentTdb has a controlledVocabulary setting and the vocabType is found,
+/* If the parentTdb has an ENCODE controlledVocabulary setting and the vocabType is found,
    then label will be wrapped with the link to display it.  Return string is cloned. */
 
-char *controlledVocabLink(char *file,char *term,char *value,char *title, char *label,char *suffix);
-// returns allocated string of HTML link to controlled vocabulary term
+char *wgEncodeVocabLink(char *file,char *term,char *value,char *title, char *label,char *suffix);
+// returns allocated string of HTML link to ENCODE controlled vocabulary term
 
 char *metadataAsHtmlTable(char *db,struct trackDb *tdb,boolean
         showLongLabel,boolean showShortLabel);
 /* If metadata from metaDb exists, return string of html with table definition */
 
 boolean compositeMetadataToggle(char *db,struct trackDb *tdb,char *title,
         boolean embeddedInText,boolean showLongLabel);
 /* If metadata from metaTbl exists, create a link that will allow toggling it's display */
 
 boolean superTrackDropDownWithExtra(struct cart *cart, struct trackDb *tdb,
                                     int visibleChild,char *extra);
 /* Displays hide/show dropdown for supertrack.
  * Set visibleChild to indicate whether 'show' should be grayed
  * out to indicate that no supertrack members are visible:
  *    0 to gray out (no visible children)
@@ -1367,19 +1367,24 @@
 struct asObject *asForTdb(struct sqlConnection *conn, struct trackDb *tdb);
 // Get autoSQL description if any associated with table.
 
 struct asColumn *asColumnFind(struct asObject *asObj, char *name);
 // Return named column.
 
 struct slName *asColNames(struct asObject *as);
 // Get list of column names.
 
 /********************/
 /* Basic info for controlled vocabulary terms (e.g. to display for composites, or cluster tracks */
 
 char *vocabLink(struct hash *vocabFieldHash, char *term, char *title);
 /* Make an anchor with mouseover containing description and link if present */
 
-struct hash *vocabBasicFromSetting(struct trackDb *parentTdb, struct cart *cart, char *setting);
+struct hash *vocabBasicFromSetting(struct trackDb *parentTdb, struct cart *cart);
 /* Get description and URL for all vocabTables. Returns a hash of hashes */
 
+boolean vocabSettingIsEncode(char *setting);
+/* Distinguish ENCODE controlled vocab settings (first arg is cv.ra filename) from non-ENCODE 
+    (table-based vocabs)
+*/
+
 #endif /* HUI_H */