aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
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