f0ffa5ddb60e25932b50b2638100d9fef8e36502
braney
  Thu Apr 28 15:07:52 2016 -0700
highlight the Gencode id on the hgGene page for Gencode.

diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c
index 3a5e78d..7d42ba7 100644
--- src/hg/hgGene/hgGene.c
+++ src/hg/hgGene/hgGene.c
@@ -613,30 +613,32 @@
 struct genePred *gp = NULL;
 hFindSplitTable(sqlGetDatabase(conn), curGeneChrom, track, table, &hasBin);
 bool hasAttrId = sqlColumnExists(conn, table, "alignId");
 sqlSafef(query, sizeof(query),
 	"select * from %s where name = '%s' "
 	"and chrom = '%s' and txStart=%d and txEnd=%d"
 	, table, curGeneId, curGeneChrom, curGeneStart, curGeneEnd);
 sr = sqlGetResult(conn, query);
 if ((row = sqlNextRow(sr)) != NULL)
     {
     gp = genePredLoad(row + hasBin);
 
 #define  ALIGNIDFIELD      11  // Gencode Id
     if (hasAttrId)
 	curAlignId = cloneString(row[ALIGNIDFIELD]);
+    else
+	curAlignId = gp->name;
     }
 sqlFreeResult(&sr);
 if (gp == NULL)
     errAbort("getCurGenePred: Can't find %s", query);
 return gp;
 }
 
 void doKgMethod()
 /* display knownGene.html content (UCSC Known Genes
  * Method, Credits, and Data Use Restrictions) */
 {
 cartWebStart(cart, database, "Methods, Credits, and Use Restrictions");
 struct trackDb *tdb = hTrackDbForTrack(database, genomeSetting("knownGene"));
 hPrintf("%s", tdb->html);
 cartWebEnd();
@@ -683,31 +685,31 @@
 	doGetMrnaSeq(conn, curGeneId, curGeneName);
     else if (cartVarExists(cart, hggDoWikiTrack))
 	doWikiTrack(conn);
     else if (cartVarExists(cart, hggDoGetProteinSeq))
 	doGetProteinSeq(conn, curGeneId, curGeneName);
     else if (cartVarExists(cart, hggDoRnaFoldDisplay))
 	doRnaFoldDisplay(conn, curGeneId, curGeneName);
     else if (cartVarExists(cart, hggDoOtherProteinSeq))
 	doOtherProteinSeq(conn, curGeneName);
     else if (cartVarExists(cart, hggDoOtherProteinAli))
 	doOtherProteinAli(conn, curGeneId, curGeneName);
     else
 	{
 	/* Default case - start fancy web page. */
 	cartWebStart(cart, database, "%s Gene %s (%s) Description and Page Index",
-	    genome, curGeneName, curGeneId);
+	    genome, curGeneName, curAlignId);
 	webMain(conn);
 	cartWebEnd();
 	}
     hFreeConn(&spConn);
     hFreeConn(&conn);
     }
 cartRemovePrefix(cart, hggDoPrefix);
 }
 
 char *excludeVars[] = {"Submit", "submit", "ajax", hggAjaxSection, NULL};
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 long enteredMainTime = clock1000();