aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-03-17 21:33:06 +0000
committerzsloan2021-03-17 21:33:06 +0000
commit2eda56348a97abaf61760c732dcc2032232f00aa (patch)
tree9f58fb0edd9e5dc0a3064b6cf16540d4f53a68f1 /wqflask
parent025811e559a1e6b1f04cd45f4f69a53fa7bbb379 (diff)
downloadgenenetwork2-2eda56348a97abaf61760c732dcc2032232f00aa.tar.gz
Fixed the logic for creating the RRID links to account for the fact that the rat IDs don't have any prefix with a colon
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index 6017f895..112298a1 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -71,12 +71,15 @@ class SampleList(object):
#ZS: Add a url so RRID case attributes can be displayed as links
if 'rrid' in sample.extra_attributes:
- if len(sample.extra_attributes['rrid'].split(":")) > 1:
- the_rrid = sample.extra_attributes['rrid'].split(":")[1]
- sample.extra_attributes['rrid'] = [sample.extra_attributes['rrid']]
- if self.dataset.group.species == "mouse":
+ if self.dataset.group.species == "mouse":
+ if len(sample.extra_attributes['rrid'].split(":")) > 1:
+ the_rrid = sample.extra_attributes['rrid'].split(":")[1]
+ sample.extra_attributes['rrid'] = [sample.extra_attributes['rrid']]
sample.extra_attributes['rrid'].append(webqtlConfig.RRID_MOUSE_URL % the_rrid)
- elif self.dataset.group.species == "rat":
+ elif self.dataset.group.species == "rat":
+ if len(str(sample.extra_attributes['rrid'])):
+ the_rrid = sample.extra_attributes['rrid']
+ sample.extra_attributes['rrid'] = [sample.extra_attributes['rrid']]
sample.extra_attributes['rrid'].append(webqtlConfig.RRID_RAT_URL % the_rrid)
self.sample_list.append(sample)