1616968f8983af9ef8d29462b279caa2de56a593
angie
  Fri Dec 6 13:55:39 2013 -0800
Finally added hgTrackUi links for tracks offered by hgVai.  Thanks for the prod, Jonathan!  refs #11461
diff --git src/hg/hgVai/hgVai.c src/hg/hgVai/hgVai.c
index 646b144..0f6297b 100644
--- src/hg/hgVai/hgVai.c
+++ src/hg/hgVai/hgVai.c
@@ -640,31 +640,33 @@
 
 void trackCheckBoxSection(char *sectionSuffix, char *title, struct slRef *trackRefList)
 /* If trackRefList is non-NULL, make a collapsible section with a checkbox for each track,
  * labelled with longLabel. */
 {
 if (trackRefList != NULL)
     {
     startCollapsibleSection(sectionSuffix, title, FALSE);
     struct slRef *ref;
     for (ref = trackRefList;  ref != NULL;  ref = ref->next)
 	{
 	struct trackDb *tdb = ref->val;
 	char cartVar[512];
 	safef(cartVar, sizeof(cartVar), "hgva_track_%s_%s", database, tdb->track);
 	cartMakeCheckBox(cart, cartVar, FALSE);
-	printf("%s<BR>\n", tdb->longLabel);
+	struct trackDb *topTdb = trackDbTopLevelSelfOrParent(tdb);
+	printf("<A HREF=\"%s?%s&g=%s\">%s</A><BR>\n", hgTrackUiName(), cartSidUrlString(cart),
+	       topTdb->track, tdb->longLabel);
 	}
     puts("<BR>");
     endCollapsibleSection();
     }
 }
 
 void selectAnnotations()
 /* Beyond predictions of protein-coding effect, what other basic data can we integrate? */
 {
 struct slName *dbNsfpTables = findDbNsfpTables();
 boolean gotSnp = findSnpBed4("", NULL, NULL);
 struct slRef *regTrackRefList = findRegulatoryTracks();
 struct slRef *elTrackRefList = NULL, *scoreTrackRefList = NULL;
 findCons(&elTrackRefList, &scoreTrackRefList);
 if (dbNsfpTables == NULL && !gotSnp && elTrackRefList == NULL && scoreTrackRefList == NULL