aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
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
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')
-rwxr-xr-xwqflask/base/data_set.py2
-rwxr-xr-xwqflask/base/trait.py12
2 files changed, 12 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 8296adea..fbe78d5d 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -629,7 +629,7 @@ class PhenotypeDataSet(DataSet):
description = this_trait.pre_publication_description
- this_trait.description_display = description
+ this_trait.description_display = description.strip()
if not this_trait.year.isdigit():
this_trait.pubmed_text = "N/A"
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