diff options
author | zsloan | 2021-08-23 19:06:01 +0000 |
---|---|---|
committer | zsloan | 2021-08-23 19:06:01 +0000 |
commit | fff90d1a1b194fe5e65e99506bc4fe6fffc9a255 (patch) | |
tree | a5a821c0f87e8b9cb2fdeb39d2b9dca5388a7f7a | |
parent | 654b35c2050e89f9ba533a3713d40465cf6fcd47 (diff) | |
download | genenetwork2-fff90d1a1b194fe5e65e99506bc4fe6fffc9a255.tar.gz |
Account for situations where the minimum permutation value is also above webqtlConfig.MAXLRS; previously threw an error
-rw-r--r-- | wqflask/utility/Plot.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/Plot.py b/wqflask/utility/Plot.py index 9b2c6735..d4256a46 100644 --- a/wqflask/utility/Plot.py +++ b/wqflask/utility/Plot.py @@ -139,7 +139,7 @@ def plotBar(canvas, data, barColor=BLUE, axesColor=BLACK, labelColor=BLACK, XLab max_D = max(data) min_D = min(data) # add by NL 06-20-2011: fix the error: when max_D is infinite, log function in detScale will go wrong - if max_D == float('inf') or max_D > webqtlConfig.MAXLRS: + if (max_D == float('inf') or max_D > webqtlConfig.MAXLRS) and min_D < webqtlConfig.MAXLRS: max_D = webqtlConfig.MAXLRS # maximum LRS value xLow, xTop, stepX = detScale(min_D, max_D) @@ -156,7 +156,7 @@ def plotBar(canvas, data, barColor=BLUE, axesColor=BLACK, labelColor=BLACK, XLab j += step for i, item in enumerate(data): - if item == float('inf') or item > webqtlConfig.MAXLRS: + if (item == float('inf') or item > webqtlConfig.MAXLRS) and min_D < webqtlConfig.MAXLRS: item = webqtlConfig.MAXLRS # maximum LRS value j = int((item - xLow) / step) Count[j] += 1 |