aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py13
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py1
2 files changed, 12 insertions, 2 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index ece485ae..6017f895 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -2,13 +2,12 @@ import re
import itertools
from flask import g
-from base import webqtlCaseData
+from base import webqtlCaseData, webqtlConfig
from pprint import pformat as pf
from utility import Plot
from utility import Bunch
-
class SampleList(object):
def __init__(self,
dataset,
@@ -70,6 +69,16 @@ class SampleList(object):
sample.extra_attributes = self.sample_attribute_values.get(
sample_name, {})
+ #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":
+ sample.extra_attributes['rrid'].append(webqtlConfig.RRID_MOUSE_URL % the_rrid)
+ elif self.dataset.group.species == "rat":
+ sample.extra_attributes['rrid'].append(webqtlConfig.RRID_RAT_URL % the_rrid)
+
self.sample_list.append(sample)
self.se_exists = any(sample.variance for sample in self.sample_list)
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index cf3accaa..878c41c0 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -269,6 +269,7 @@ class ShowTrait(object):
short_description = short_description,
unit_type = trait_units,
dataset_type = self.dataset.type,
+ species = self.dataset.group.species,
scales_in_geno = self.scales_in_geno,
data_scale = self.dataset.data_scale,
sample_group_types = self.sample_group_types,