aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorzsloan2016-06-03 16:59:25 +0000
committerzsloan2016-06-03 16:59:25 +0000
commitab133cc37015ea469f4d41155b58f0435d9001f3 (patch)
tree9942d840ea8283a7a6f23319bb1c971377a04211 /wqflask/base/trait.py
parentda5268183ac424cf591ce2abb90a336b41009bb9 (diff)
downloadgenenetwork2-ab133cc37015ea469f4d41155b58f0435d9001f3.tar.gz
Changed appearance of tables to more easily differentiate them from the rest of the page (still not totally pleased with them though)
Fixed issue where some N/A lrs scores and additive effects were being changed to 0's, which was misleading and kept them from always being sorted at the bottom. They now appear as N/A.
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 0c962331..a71d8157 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -444,9 +444,9 @@ class GeneralTrait(object):
self.locus_chr = result[0]
self.locus_mb = result[1]
else:
- self.locus = self.locus_chr = self.locus_mb = ""
+ self.locus = self.locus_chr = self.locus_mb = self.additive = ""
else:
- self.locus = self.locus_chr = self.locus_mb = ""
+ self.locus = self.locus_chr = self.locus_mb = self.additive = ""
else:
self.locus = self.locus_chr = self.locus_mb = self.lrs = self.pvalue = self.mean = self.additive = ""
@@ -476,9 +476,9 @@ class GeneralTrait(object):
self.locus_chr = result[0]
self.locus_mb = result[1]
else:
- self.locus = self.locus_chr = self.locus_mb = ""
+ self.locus = self.locus_chr = self.locus_mb = self.additive = ""
else:
- self.locus = self.locus_chr = self.locus_mb = ""
+ self.locus = self.locus_chr = self.locus_mb = self.additive = ""
else:
self.locus = self.lrs = self.additive = ""
@@ -492,9 +492,10 @@ class GeneralTrait(object):
else:
LRS_location_value = ord(str(self.locus_chr).upper()[0])*1000 + float(self.locus_mb)
- self.LRS_location_repr = LRS_location_repr = 'Chr%s: %.6f' % (self.locus_chr, float(self.locus_mb))
- self.LRS_score_repr = LRS_score_repr = '%3.1f' % self.lrs
- self.LRS_score_value = LRS_score_value = self.lrs
+ self.LRS_location_repr = LRS_location_repr = 'Chr%s: %.6f' % (self.locus_chr, float(self.locus_mb))
+ if self.lrs != "":
+ self.LRS_score_repr = LRS_score_repr = '%3.1f' % self.lrs
+ self.LRS_score_value = LRS_score_value = self.lrs
else:
raise KeyError, `self.name`+' information is not found in the database.'