cbfd2211326099053c026e0cf592c130d1a1905b angie Wed Jan 27 15:28:53 2021 -0800 Revert "As for wiggle, make bigWig's viewLimits min and max come from the data." refs #26872 This reverts commit 9a1dd73f2df69278e2b5ab8c62d531205ab87845. diff --git src/hg/lib/wiggleCart.c src/hg/lib/wiggleCart.c index 1861b30..7e2530d 100644 --- src/hg/lib/wiggleCart.c +++ src/hg/lib/wiggleCart.c @@ -1,30 +1,29 @@ /* wiggleCart - take care of parsing and combining values from the * wiggle trackDb optional settings and the same values that may be * in the cart. */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "jksql.h" #include "trackDb.h" #include "cart.h" #include "dystring.h" #include "hui.h" #include "wiggle.h" -#include "bigWig.h" #define correctOrder(min,max) if (max < min) \ { double d; d = max; max = min; min = d; } /* check a min,max pair (doubles) and keep them properly in order */ #if defined(DEBUG) /* dbg */ #include "portable.h" static long wigProfileEnterTime = 0; void wigProfileEnter() { wigProfileEnterTime = clock1000(); @@ -157,48 +156,30 @@ double absMax = 0.0, absMin = 0.0; boolean missingAbsMin = FALSE, missingAbsMax = FALSE; if (isBedGraph) { char *tdbMin = trackDbSettingClosestToHomeOrDefault(tdb, MIN_LIMIT, NULL); char *tdbMax = trackDbSettingClosestToHomeOrDefault(tdb, MAX_LIMIT, NULL); if (tdbMin == NULL) missingAbsMin = TRUE; else absMin = sqlDouble(tdbMin); if (tdbMax == NULL) missingAbsMax = TRUE; else absMax = sqlDouble(tdbMax); } -else if (sameString(tdb->type, "bigWig")) - { - // bigWig: get default absMin and absMax from data - char *fileName = trackDbSetting(tdb, "bigDataUrl"); - if (fileName) - { - struct bbiFile *bwf = bigWigFileOpen(hReplaceGbdb(fileName)); - struct bbiSummaryElement sum = bbiTotalSummary(bwf); - absMin = sum.minVal; - absMax = sum.maxVal; - bigWigFileClose(&bwf); - } - else - { - missingAbsMin = TRUE; - missingAbsMax = TRUE; - } - } else { // Wiggle: get min and max from type setting, which has been chopped into words and wordCount: // type wig <min> <max> if (wordCount >= 3) absMax = atof(words[2]); else missingAbsMax = TRUE; if (wordCount >= 2) absMin = atof(words[1]); else missingAbsMin = TRUE; } correctOrder(absMin, absMax);