ae53d1dc78b4079bb3427597efe465aa7bfe6ddc kent Mon Jul 4 17:34:00 2022 -0700 Changing debugging output. diff --git src/hg/hgTracks/cds.c src/hg/hgTracks/cds.c index d9c24b9..87adc71 100644 --- src/hg/hgTracks/cds.c +++ src/hg/hgTracks/cds.c @@ -1042,40 +1042,41 @@ /* seqSource is: extFile seqTbl extFileTbl */ static struct dyString *buf = NULL; if (buf == NULL) buf = dyStringNew(0); dyStringClear(buf); dyStringAppend(buf, seqSource); char *words[3]; int nwords = chopByWhite(buf->string, words, ArraySize(words)); if ((nwords != ArraySize(words)) || !sameString(words[0], "extFile")) errAbort("invalid %s track setting: %s", BASE_COLOR_USE_SEQUENCE, seqSource); return hDnaSeqGet(database, name, words[1], words[2]); } +struct cacheTwoBitRanges *cdsQueryCache = NULL; + static struct dnaSeq *fetchCachedTwoBitSeq(char *url, char *seqName, int seqStart, int seqEnd, boolean doRc, int *retSeqOffset) /* fetch a sequence from a 2bit. Caches open two bit files and sequence in * both forward and reverse strand */ { /* Init static url cache */ -static struct cacheTwoBitRanges *cache = NULL; // hash of open files -if (cache == NULL) - cache = cacheTwoBitRangesNew(TRUE); -return cacheTwoBitRangesMayFetch(cache, url, seqName, seqStart, seqEnd, doRc, retSeqOffset); +if (cdsQueryCache == NULL) + cdsQueryCache = cacheTwoBitRangesNew(TRUE); +return cacheTwoBitRangesMayFetch(cdsQueryCache, url, seqName, seqStart, seqEnd, doRc, retSeqOffset); } static struct dnaSeq *maybeGetSeqUpper(struct linkedFeatures *lf, char *mrnaName, int mrnaStart, int mrnaEnd, char *tableName, struct track *tg, boolean doRc, int *retMrnaOffset) /* Look up the sequence in genbank tables (hGenBankGetMrna also searches * seq if it can't find it in GB tables) or user's blat sequence, * uppercase and return it if we find it, return NULL if we don't find it. */ { boolean doUpper = TRUE; struct dnaSeq *mrnaSeq = NULL; char *name = getItemDataName(tg, mrnaName); if (sameString(tableName,"refGene") || sameString(tableName,"refSeqAli")) mrnaSeq = hGenBankGetMrna(database, name, "refMrna"); else