aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2015-06-29 13:20:37 -0500
committerzsloan2015-06-29 13:20:37 -0500
commit42172d04c4231f69d67c204b82cf6bc8c7b1bc10 (patch)
tree080b2197322bf13fa7953b187c8935d8c3ce6520
parentb8152f98f0d9c2a1ec0d73145a4670153b60a307 (diff)
parent45ebe51fbee7da1617b01cff7b9ab404d6ad1aa7 (diff)
downloadgenenetwork2-42172d04c4231f69d67c204b82cf6bc8c7b1bc10.tar.gz
Merge pull request #72 from lomereiter/issue69
Fixes #69
-rwxr-xr-xwqflask/base/data_set.py6
-rwxr-xr-xwqflask/base/trait.py9
-rwxr-xr-xwqflask/utility/webqtlUtil.py1
-rwxr-xr-xwqflask/wqflask/show_trait/show_trait.py9
4 files changed, 9 insertions, 16 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 14a2a388..d46e4363 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -392,6 +392,12 @@ class DatasetGroup(object):
Redis.set(key, json.dumps(self.samplelist))
Redis.expire(key, 60*5)
+ def all_samples_ordered(self):
+ result = []
+ lists = (self.parlist, self.f1list, self.samplelist)
+ [result.extend(l) for l in lists if l]
+ return result
+
def read_genotype_file(self):
'''Read genotype from .geno file instead of database'''
#if self.group == 'BXD300':
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 7689a469..4a088bc8 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -251,14 +251,7 @@ class GeneralTrait(object):
# Todo: is this necessary? If not remove
self.data.clear()
- if self.dataset.group.parlist:
- all_samples_ordered = (self.dataset.group.parlist +
- self.dataset.group.f1list +
- self.dataset.group.samplelist)
- elif self.dataset.group.f1list:
- all_samples_ordered = self.dataset.group.f1list + self.dataset.group.samplelist
- else:
- all_samples_ordered = self.dataset.group.samplelist
+ all_samples_ordered = self.dataset.group.all_samples_ordered()
if results:
for item in results:
diff --git a/wqflask/utility/webqtlUtil.py b/wqflask/utility/webqtlUtil.py
index 4b3d0112..f842dde0 100755
--- a/wqflask/utility/webqtlUtil.py
+++ b/wqflask/utility/webqtlUtil.py
@@ -43,6 +43,7 @@ ParInfo ={
'BXH':['BHF1', 'HBF1', 'C57BL/6J', 'C3H/HeJ'],
'AKXD':['AKF1', 'KAF1', 'AKR/J', 'DBA/2J'],
'BXD':['B6D2F1', 'D2B6F1', 'C57BL/6J', 'DBA/2J'],
+'C57BL-6JxC57BL-6NJF2':['', '', 'C57BL/6J', 'C57BL/6NJ'],
'BXD300':['B6D2F1', 'D2B6F1', 'C57BL/6J', 'DBA/2J'],
'B6BTBRF2':['B6BTBRF1', 'BTBRB6F1', 'C57BL/6J', 'BTBRT<+>tf/J'],
'BHHBF2':['B6HF2','HB6F2','C57BL/6J','C3H/HeJ'],
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index bd827086..61305e9b 100755
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -1148,14 +1148,7 @@ class ShowTrait(object):
def make_sample_lists(self, this_trait):
- if self.dataset.group.parlist:
- all_samples_ordered = (self.dataset.group.parlist +
- self.dataset.group.f1list +
- self.dataset.group.samplelist)
- elif self.dataset.group.f1list:
- all_samples_ordered = self.dataset.group.f1list + self.dataset.group.samplelist
- else:
- all_samples_ordered = list(self.dataset.group.samplelist)
+ all_samples_ordered = self.dataset.group.all_samples_ordered()
primary_sample_names = list(all_samples_ordered)