e22f12e30ffc45d4b6657aeca878a22eeb239edd
braney
  Thu Jul 2 16:05:42 2020 -0700
add gencode transcript details to hgGene

diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c
index 6ab1ab3..11f279d 100644
--- src/hg/hgGene/hgGene.c
+++ src/hg/hgGene/hgGene.c
@@ -22,30 +22,31 @@
 #include "hgColors.h"
 #include "hgGene.h"
 #include "obscure.h"
 #include "genbank.h"
 
 
 /* ---- Global variables. ---- */
 struct cart *cart;	/* This holds cgi and other variables between clicks. */
 struct hash *oldVars;	/* Old cart hash. */
 char *database;		/* Name of genome database - hg15, mm3, or the like. */
 char *genome;		/* Name of genome - mouse, human, etc. */
 char *curGeneId;	/* Current Gene Id. */
 char *curGeneName;		/* Biological name of gene. */
 char *curGeneChrom;	/* Chromosome current gene is on. */
 char *curAlignId;       /* Align id from knownGene genePred */
+struct trackDb *globalTdb;
 struct genePred *curGenePred;	/* Current gene prediction structure. */
 boolean isGencode;              /* is this based on the Gencode models */
 boolean isGencode2;             /* is this based on the Gencode models and use ensembl id as primary id */
 int curGeneStart,curGeneEnd;	/* Position in chromosome. */
 struct sqlConnection *spConn;	/* Connection to SwissProt database. */
 char *swissProtAcc;		/* SwissProt accession (may be NULL). */
 int  kgVersion = KG_UNKNOWN;	/* KG version */
 int measureTiming = FALSE;
 
 //#include "rgdInfo.c"
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
@@ -431,30 +432,31 @@
 /* temporarily disable microarray section for Zebrafish, until a bug is fixed */
 if (strstr(database, "danRer") == NULL)
     {
     addGoodSection(microarraySection(conn, sectionRa), conn, &sectionList);
     }
 addGoodSection(rnaStructureSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(domainsSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(altSpliceSection(conn, sectionRa), conn, &sectionList);
 // addGoodSection(multipleAlignmentsSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(swissProtCommentsSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(flyBaseRolesSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(flyBasePhenotypesSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(flyBaseSynonymsSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(bdgpExprInSituSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(goSection(conn, sectionRa), conn, &sectionList);
+addGoodSection(gencodeSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(infoSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(methodSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(localizationSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(transRegCodeMotifSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(pathwaysSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(mrnaDescriptionsSection(conn, sectionRa), conn, &sectionList);
 //addGoodSection(pseudoGeneSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(synonymSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(geneReviewsSection(conn, sectionRa), conn, &sectionList);
 addGoodSection(allelesSection(conn, sectionRa), conn, &sectionList);
 
 // addGoodSection(xyzSection(conn, sectionRa), conn, &sectionList);
 
 slSort(&sectionList, sectionCmpPriority);
 return sectionList;
@@ -709,30 +711,31 @@
 else
     {
     struct sqlConnection *conn = NULL;
     char *geneName = cartUsualString(cart, hggGene, NULL);
     if (isEmpty(geneName))
 	{
 	// Silly googlebots.
 	hUserAbort("Error: the hgg_gene parameter is missing from the cart and the CGI params.");
 	}
 
     /* if kgProtMap2 table exists, this means we are doing KG III */
     if (hTableExists(database, "kgProtMap2")) kgVersion = KG_III;
 
     char *tableName = cartUsualString(cart, hggType, NULL);
     struct trackDb *tdb = hTrackDbForTrack(database, tableName);
+    globalTdb = tdb;
     char *externalDb = trackDbSetting(tdb, "externalDb");
     if (externalDb != NULL)
         conn = hAllocConn(externalDb);
     else
         conn = hAllocConn(database);
     curGeneId = findGeneId(conn, geneName);
     getGenePosition(conn);
     curGenePred = getCurGenePred(conn);
     curGeneName = getGeneName(curGeneId, conn);
     spConn = hAllocConn(UNIPROT_DB_NAME);
     swissProtAcc = getSwissProtAcc(conn, spConn, curGeneId);
 
     if (isRgdGene(conn)) swissProtAcc=getRgdGeneUniProtAcc(curGeneId, conn);
     /* Check command variables, and do the ones that
      * don't want to put up the hot link bar etc. */