25a1ed58b2f9fc2d9ad7fdbe9117f0b2f47253f3
fanhsu
  Tue Nov 9 16:38:23 2010 -0800
Update for RGD Genes, Redmine issue #29.
diff --git src/hg/hgGene/links.c src/hg/hgGene/links.c
index 64d1be8..f71ab6f 100644
--- src/hg/hgGene/links.c
+++ src/hg/hgGene/links.c
@@ -133,31 +133,38 @@
 /* Some special case code here for things that need to
  * do more than check a table. */
 if (sameString(link->name, "family"))
     {
     if (!hgNearOk(database))
         return NULL;
     }
 if (sameString(link->name, "protBrowser"))
     {
     if (!hgPbOk(database))
         return NULL;
     /* special processing for PB, since we need the protein ID, instead everything key off from gene ID */
     /* use UniProt accession instead of displayID, because display ID sometimes changes */
     if (swissProtAcc == NULL || swissProtAcc[0] == 0)
         return NULL;
+    if (isRgdGene(conn))
+    	{
+	safef(query, sizeof(query), "../cgi-bin/pbGlobal?proteinID=%s", swissProtAcc);
+    	}
+    else
+	{
     safef(query, sizeof(query), "../cgi-bin/pbTracks?db=%s&proteinID=%s", database, swissProtAcc);
+    	}
     return(cloneString(query));
     }
 if (sameString(link->name, "tbSchema"))
     {
     char *geneTable = genomeSetting("knownGene");
     struct trackDb *tdb = hTrackDbForTrack(sqlGetDatabase(conn), geneTable);
     struct dyString *dy = NULL;
     if (tdb == NULL)
 	return NULL;
     dy = newDyString(256);
     dyStringPrintf(dy, link->url, tdb->grp, geneTable, geneTable);
     trackDbFree(&tdb);
     addLinkExtras(link, dy);
     return dyStringCannibalize(&dy);
     }