13d5f7b0d091ed228affad0262face3167f00d2e
kate
  Wed Aug 24 14:52:52 2016 -0700
Gene page link to browser from GTEx section now includes gene position, so if launched from other than browser (e.g. Gene Sorter) it will show gene region. refs #17288

diff --git src/hg/hgGene/gtex.c src/hg/hgGene/gtex.c
index f05f2be..32b9494 100644
--- src/hg/hgGene/gtex.c
+++ src/hg/hgGene/gtex.c
@@ -67,34 +67,36 @@
 char query[512];
 sqlSafef(query, sizeof(query), "SELECT * from gtexGene WHERE geneId='%s'", ensGene);
 struct gtexGeneBed *gtexGene = gtexGeneBedLoadByQuery(conn, query);
 assert(gtexGene);
 
 int tisId;
 float highestLevel = gtexGeneHighestMedianExpression(gtexGene, &tisId);
 char *highestTissue = gtexGetTissueDescription(tisId, NULL);
 float totalLevel = gtexGeneTotalMedianExpression(gtexGene);
 printf("<b>Highest median expression: </b> %0.2f RPKM in %s\n", highestLevel, highestTissue);
 printf("<br><b>Total median expression: </b> %0.2f RPKM<br><br>\n", totalLevel);
 
 struct tempName pngTn;
 if (gtexGeneBoxplot(ensGene, NULL, GTEX_DEFAULT_VERSION, FALSE, &pngTn))
     hPrintf("<img src = '%s' border=1><br>\n", pngTn.forHtml);
-hPrintf("<br><a target='_blank' href='../cgi-bin/hgTracks?%s&gtexGene=pack'>"
-                "View in GTEx track of Genome Browser</a>", cartSidUrlString(cart));
+hPrintf("<br><a target='_blank' href='../cgi-bin/hgTracks?%s&position=%s:%d-%d&gtexGene=pack'>"
+                "View in GTEx track of Genome Browser</a>", 
+                        cartSidUrlString(cart), curGeneChrom, curGeneStart, curGeneEnd);
 
 hPrintf("&nbsp;&nbsp;&nbsp;&nbsp;");
-gtexPortalLink(ensGene);
+//gtexPortalLink(ensGene);
+// Link is broken as of 8/23/16. Broad has been alerted.
 }
 
 struct section *gtexSection(struct sqlConnection *conn, struct hash *sectionRa)
 /* Create GTEx gene expression section. */
 {
 struct section *section = sectionNew(sectionRa, "gtex");
 if (section != NULL)
     {
     section->exists = gtexExists;
     section->print = gtexPrint;
     }
 return section;
 }