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, §ionList); } addGoodSection(rnaStructureSection(conn, sectionRa), conn, §ionList); addGoodSection(domainsSection(conn, sectionRa), conn, §ionList); addGoodSection(altSpliceSection(conn, sectionRa), conn, §ionList); // addGoodSection(multipleAlignmentsSection(conn, sectionRa), conn, §ionList); addGoodSection(swissProtCommentsSection(conn, sectionRa), conn, §ionList); addGoodSection(flyBaseRolesSection(conn, sectionRa), conn, §ionList); addGoodSection(flyBasePhenotypesSection(conn, sectionRa), conn, §ionList); addGoodSection(flyBaseSynonymsSection(conn, sectionRa), conn, §ionList); addGoodSection(bdgpExprInSituSection(conn, sectionRa), conn, §ionList); addGoodSection(goSection(conn, sectionRa), conn, §ionList); +addGoodSection(gencodeSection(conn, sectionRa), conn, §ionList); addGoodSection(infoSection(conn, sectionRa), conn, §ionList); addGoodSection(methodSection(conn, sectionRa), conn, §ionList); addGoodSection(localizationSection(conn, sectionRa), conn, §ionList); addGoodSection(transRegCodeMotifSection(conn, sectionRa), conn, §ionList); addGoodSection(pathwaysSection(conn, sectionRa), conn, §ionList); addGoodSection(mrnaDescriptionsSection(conn, sectionRa), conn, §ionList); //addGoodSection(pseudoGeneSection(conn, sectionRa), conn, §ionList); addGoodSection(synonymSection(conn, sectionRa), conn, §ionList); addGoodSection(geneReviewsSection(conn, sectionRa), conn, §ionList); addGoodSection(allelesSection(conn, sectionRa), conn, §ionList); // addGoodSection(xyzSection(conn, sectionRa), conn, §ionList); slSort(§ionList, 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. */