aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorZachary Sloan2013-11-26 00:09:26 +0000
committerZachary Sloan2013-11-26 00:09:26 +0000
commit8f91205970bfbce7bbe049889a31dfa98c9ef168 (patch)
tree2ad463f086a614cbd6adccc0eb4ad2cb6626d58e /wqflask/base/trait.py
parente069e5dd7a8f007a4bdf248f733f4003baf65ca2 (diff)
downloadgenenetwork2-8f91205970bfbce7bbe049889a31dfa98c9ef168.tar.gz
Made some progress towards getting the traits inside a collection to display on hover
Diffstat (limited to 'wqflask/base/trait.py')
-rwxr-xr-xwqflask/base/trait.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 74bc07bb..9e4f0944 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -43,7 +43,7 @@ class GeneralTrait(object):
self.sequence = kw.get('sequence') # Blat sequence, available for ProbeSet
self.data = kw.get('data', {})
- # Sets defaultst
+ # Sets defaults
self.locus = None
self.lrs = None
self.pvalue = None
@@ -63,6 +63,16 @@ class GeneralTrait(object):
# So we could add a simple if statement to short-circuit this if necessary
self.retrieve_info(get_qtl_info=get_qtl_info)
self.retrieve_sample_data()
+
+
+ def jsonable(self):
+ """Return a dict suitable for using as json
+
+ Actual turning into json doesn't happen here though"""
+ return dict(name=self.name,
+ description=self.description_display,
+ mean=self.mean)
+
def get_info(self):
"""For lots of traits just use get_trait_info in dataset instead...that will be way