aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/Plot.py
diff options
context:
space:
mode:
authorzsloan2021-08-23 14:34:12 -0500
committerGitHub2021-08-23 14:34:12 -0500
commit895f9c0d1070ad9f5facd34e6307e3c60b31c226 (patch)
tree12e2a233cb4474e35f96aef53e32b3252bab75c6 /wqflask/utility/Plot.py
parent4dafd017ec1fc0cd1e78487560ed15d705a44b98 (diff)
parent629aab0ef51c2c6f7d4f479e51a7168d9aa14d41 (diff)
downloadgenenetwork2-895f9c0d1070ad9f5facd34e6307e3c60b31c226.tar.gz
Merge pull request #599 from zsloan/bug/fix_mapping_recompute_issue
Bug/fix mapping recompute issue
Diffstat (limited to 'wqflask/utility/Plot.py')
-rw-r--r--wqflask/utility/Plot.py4
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