From e79ddce5ac463938c3a08b101619455863cf0280 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 11 Oct 2022 23:11:00 +0000 Subject: Include chr/mb values in jsonable trait --- wqflask/base/trait.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3