diff options
author | zsloan | 2022-10-11 23:11:00 +0000 |
---|---|---|
committer | zsloan | 2022-10-12 18:15:58 +0000 |
commit | e79ddce5ac463938c3a08b101619455863cf0280 (patch) | |
tree | 1fcc7eca7f7610745eb79b940d6301cb4808607c /wqflask/base | |
parent | 931fdf8795db0c68daba29dbaa25b8e52f86e7f8 (diff) | |
download | genenetwork2-e79ddce5ac463938c3a08b101619455863cf0280.tar.gz |
Include chr/mb values in jsonable trait
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/trait.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index f8262203..98a10916 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -96,6 +96,7 @@ class GeneralTrait: self.LRS_score_repr = "N/A" self.LRS_location_repr = "N/A" + self.chr = self.mb = self.locus_chr = self.locus_mb = "" if kw.get('fullname'): name2 = value.split("::") @@ -311,8 +312,12 @@ def jsonable(trait, dataset=None): description=trait.description_display, mean=trait.mean, location=trait.location_repr, + chr=trait.chr, + mb=trait.mb, lrs_score=trait.LRS_score_repr, lrs_location=trait.LRS_location_repr, + lrs_chr=trait.locus_chr, + lrs_mb=trait.locus_mb, additive=trait.additive ) elif dataset.type == "Publish": @@ -333,6 +338,8 @@ def jsonable(trait, dataset=None): mean=trait.mean, lrs_score=trait.LRS_score_repr, lrs_location=trait.LRS_location_repr, + lrs_chr=trait.locus_chr, + lrs_mb=trait.locus_mb, additive=trait.additive ) else: @@ -350,6 +357,8 @@ def jsonable(trait, dataset=None): mean=trait.mean, lrs_score=trait.LRS_score_repr, lrs_location=trait.LRS_location_repr, + lrs_chr=trait.locus_chr, + lrs_mb=trait.locus_mb, additive=trait.additive ) elif dataset.type == "Geno": @@ -359,7 +368,9 @@ def jsonable(trait, dataset=None): view=str(trait.view), dataset=dataset.name, dataset_name=dataset.shortname, - location=trait.location_repr + location=trait.location_repr, + chr=trait.chr, + mb=trait.mb ) elif dataset.name == "Temp": return dict(name=trait.name, |