aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2017-06-12 15:52:02 +0000
committerzsloan2017-06-12 15:52:02 +0000
commitad7a2baa50e602c613fd4eba2f41cae7a2b75577 (patch)
treecb89930fa38388a978952003970b0219295731ed
parentdbf1c2bddf92cbc93308de0b1ae77ff2e81e8f6a (diff)
downloadgenenetwork2-ad7a2baa50e602c613fd4eba2f41cae7a2b75577.tar.gz
Fixed issue where 0.0 values would be converted into X's on the trait page
-rw-r--r--wqflask/base/trait.py1
-rw-r--r--wqflask/base/webqtlCaseData.py8
2 files changed, 4 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 33a4efe9..acc055d8 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -292,7 +292,6 @@ def retrieve_sample_data(trait, dataset, samplelist=None):
name, value, variance, num_cases, name2 = item
if not samplelist or (samplelist and name in samplelist):
trait.data[name] = webqtlCaseData(*item) #name, value, variance, num_cases)
-
return trait
def convert_location_to_value(chromosome, mb):
diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py
index 845a7224..24de8dcb 100644
--- a/wqflask/base/webqtlCaseData.py
+++ b/wqflask/base/webqtlCaseData.py
@@ -44,9 +44,9 @@ class webqtlCaseData(object):
def __repr__(self):
str = "<webqtlCaseData> "
- if self.value:
+ if self.value != None:
str += "value=%2.3f" % self.value
- if self.variance:
+ if self.variance != None:
str += " variance=%2.3f" % self.variance
if self.num_cases:
str += " ndata=%d" % self.num_cases
@@ -66,14 +66,14 @@ class webqtlCaseData(object):
@property
def display_value(self):
- if self.value:
+ if self.value != None:
return "%2.3f" % self.value
else:
return "x"
@property
def display_variance(self):
- if self.variance:
+ if self.variance != None:
return "%2.3f" % self.variance
else:
return "x"