aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorPjotr Prins2016-05-29 17:20:20 +0000
committerPjotr Prins2016-05-29 17:20:20 +0000
commit4b083f2cdfa493f7b2ccc3c30cc5bb6cad694d3a (patch)
treec2c2503d88868f13b06dd66328720486e72f647a /wqflask/base/trait.py
parent33d817c81b4b22bc051dbde2b26c5d4de028369e (diff)
parent0d22d3bc72cfc35cb23efce3d1687477880a5b3e (diff)
downloadgenenetwork2-4b083f2cdfa493f7b2ccc3c30cc5bb6cad694d3a.tar.gz
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 6c5ca8b2..d1c0be83 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -180,13 +180,15 @@ class GeneralTrait(object):
samples = []
vals = []
the_vars = []
+ sample_aliases = []
for sample_name, sample_data in self.data.items():
if sample_data.value != None:
if not include_variance or sample_data.variance != None:
samples.append(sample_name)
vals.append(sample_data.value)
the_vars.append(sample_data.variance)
- return samples, vals, the_vars
+ sample_aliases.append(sample_data.name2)
+ return samples, vals, the_vars, sample_aliases
#
@@ -230,7 +232,7 @@ class GeneralTrait(object):
if results:
for item in results:
- name, value, variance, num_cases = item
+ name, value, variance, num_cases, name2 = item
if not samplelist or (samplelist and name in samplelist):
self.data[name] = webqtlCaseData(*item) #name, value, variance, num_cases)
@@ -313,9 +315,9 @@ class GeneralTrait(object):
self.confidential = 0
if self.pre_publication_description and not self.pubmed_id:
self.confidential = 1
-
- description = self.post_publication_description
+ description = self.post_publication_description
+
#If the dataset is confidential and the user has access to confidential
#phenotype traits, then display the pre-publication description instead
#of the post-publication description
@@ -329,7 +331,7 @@ class GeneralTrait(object):
#
# description = self.pre_publication_description
- if len(description) > 0:
+ if description:
self.description_display = description.strip()
else:
self.description_display = ""
@@ -479,7 +481,7 @@ class GeneralTrait(object):
else:
self.locus = self.lrs = self.additive = ""
- if self.locus_chr != "" and self.locus_mb != "":
+ if (self.dataset.type == 'Publish' or self.dataset.type == "ProbeSet") and self.locus_chr != "" and self.locus_mb != "":
#XZ: LRS_location_value is used for sorting
try:
LRS_location_value = int(self.locus_chr)*1000 + float(self.locus_mb)