From ab133cc37015ea469f4d41155b58f0435d9001f3 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 3 Jun 2016 16:59:25 +0000 Subject: 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. --- wqflask/base/trait.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'wqflask/base') 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.' -- cgit 1.4.1