diff options
author | Pjotr Prins | 2016-10-31 20:31:15 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-31 20:31:15 +0000 |
commit | 7e6fcdeab53edf0e84189e0c18cdb0ce6dd6a41c (patch) | |
tree | ff87583daefc969efc79523e4e81b4fde98b97a7 /wqflask/base | |
parent | a5feb593a1fb541278ec213909c4e37239934796 (diff) | |
parent | 72cbf70ee82a5a4afabc37809530f70fc6d7ea2d (diff) | |
download | genenetwork2-7e6fcdeab53edf0e84189e0c18cdb0ce6dd6a41c.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/trait.py | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 32032ba7..276c624a 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -78,11 +78,37 @@ class GeneralTrait(object): """Return a dict suitable for using as json Actual turning into json doesn't happen here though""" - return dict(name=self.name, - dataset=self.dataset.name, - description=self.description_display, - mean=self.mean) - + + if self.dataset.type == "ProbeSet": + return dict(name=self.name, + symbol=self.symbol, + dataset=self.dataset.name, + description=self.description_display, + mean=self.mean, + location=self.location_repr, + lrs_score=self.LRS_score_repr, + lrs_location=self.LRS_location_repr, + additive=self.additive + ) + elif self.dataset.type == "Publish": + return dict(name=self.name, + dataset=self.dataset.name, + description=self.description_display, + authors=self.authors, + pubmed_text=self.pubmed_text, + pubmed_link=self.pubmed_link, + lrs_score=self.LRS_score_repr, + lrs_location=self.LRS_location_repr, + additive=self.additive + ) + elif self.dataset.type == "Geno": + return dict(name=self.name, + dataset=self.dataset.name, + location=self.location_repr + ) + else: + return dict() + def get_name(self): stringy = "" |