aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/trait.py3
-rw-r--r--wqflask/base/webqtlCaseData.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 3daf9ea9..e57d4176 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -189,7 +189,8 @@ def get_sample_data():
trait_dict['symbol'] = trait_ob.symbol
trait_dict['location'] = trait_ob.location_repr
elif trait_ob.dataset.type == "Publish":
- trait_dict['pubmed_link'] = trait_ob.pubmed_link
+ if trait_ob.pubmed_id:
+ trait_dict['pubmed_link'] = trait_ob.pubmed_link
trait_dict['pubmed_text'] = trait_ob.pubmed_text
return json.dumps([trait_dict, {key: value.value for key, value in trait_ob.data.iteritems() }])
diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py
index 24de8dcb..76f06cc6 100644
--- a/wqflask/base/webqtlCaseData.py
+++ b/wqflask/base/webqtlCaseData.py
@@ -77,3 +77,10 @@ class webqtlCaseData(object):
return "%2.3f" % self.variance
else:
return "x"
+
+ @property
+ def display_num_cases(self):
+ if self.num_cases != None:
+ return "%d" % self.num_cases
+ else:
+ return "x"