5c213974bb28e98d1b10ad9a86063101e684e5e3 braney Mon Oct 31 12:16:52 2022 -0700 add Jim's track duplication code diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c index f71e47a..eb2c9d8 100644 --- src/hg/hgGene/hgGene.c +++ src/hg/hgGene/hgGene.c @@ -2,30 +2,31 @@ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "hCommon.h" #include "linefile.h" #include "hash.h" #include "dystring.h" #include "jksql.h" #include "cheapcgi.h" #include "htmshell.h" #include "cart.h" #include "hui.h" #include "dbDb.h" #include "hdb.h" +#include "dupTrack.h" #include "web.h" #include "botDelay.h" #include "ra.h" #include "spDb.h" #include "genePred.h" #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. */ @@ -711,30 +712,31 @@ doTxInfoDescription(); 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); + tableName = dupTrackSkipToSourceName(tableName); char *knownDb = hdbDefaultKnownDb(database); // if no table has been given to us, try knownGene if (tableName == NULL) tableName = "knownGene"; struct trackDb *tdb = hTrackDbForTrack(database, tableName); if ((tdb == NULL) && sameString(tableName, "knownGene") && differentString(database, knownDb)) { // if no table or knownGene has been given to us, and knownGene doesn't work, try the default gene track. tableName = hdbGetMasterGeneTrack(knownDb); tdb = hTrackDbForTrack(database, tableName); }