diff options
author | acenteno | 2020-04-21 17:35:34 -0500 |
---|---|---|
committer | GitHub | 2020-04-21 17:35:34 -0500 |
commit | 660589b9c2a507529e8e51ca6ce66ca97ad982c5 (patch) | |
tree | 27f63957278581bc2fce2b88744bfe20c8a81558 /wqflask/base/webqtlCaseData.py | |
parent | d97fdc18359233f07c1a1c7b83fe7e88eb225043 (diff) | |
parent | f2a3ae13231a7d270a5bb6911c248aa713f1ef91 (diff) | |
download | genenetwork2-660589b9c2a507529e8e51ca6ce66ca97ad982c5.tar.gz |
Merge pull request #1 from genenetwork/testing
Updating my testing branch
Diffstat (limited to 'wqflask/base/webqtlCaseData.py')
-rw-r--r-- | wqflask/base/webqtlCaseData.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py index 845a7224..d8487f01 100644 --- a/wqflask/base/webqtlCaseData.py +++ b/wqflask/base/webqtlCaseData.py @@ -44,12 +44,12 @@ 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 + str += " ndata=%s" % self.num_cases if self.name: str += " name=%s" % self.name if self.name2: @@ -66,14 +66,21 @@ 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" + + @property + def display_num_cases(self): + if self.num_cases != None: + return "%s" % self.num_cases + else: + return "x" |