From a823e66f8dc742e1608b3e0db6d521d5f63b641a Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Tue, 15 Oct 2013 15:06:36 -0500 Subject: Changed templates to call the header macro Correlation page now works with Non-BXD (or whatever group) or All Samples options --- wqflask/base/data_set.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'wqflask/base/data_set.py') diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 9fa7beb3..f25e7974 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -322,7 +322,7 @@ class DatasetGroup(object): self.incparentsf1 = 0 self.genotype = genotype_1 - self.samplelist = list(genotype.prgy) + self.samplelist = list(self.genotype.prgy) #class DataSets(object): @@ -440,10 +440,12 @@ class DataSet(object): def get_trait_data(self, sample_list=None): if sample_list: - self.samplelist = sample_list + self.group.parlist + self.group.f1list + self.samplelist = sample_list else: - self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list - + self.samplelist = self.group.samplelist + + if (self.group.parlist + self.group.f1list) in self.samplelist: + self.samplelist += self.group.parlist + self.group.f1list query = """ SELECT Strain.Name, Strain.Id FROM Strain, Species @@ -503,8 +505,8 @@ class DataSet(object): and {}Freeze.Name = '{}' and {}.Id = {}XRef.{}Id order by {}.Id - """.format(*mescape(self.type, self.type, self.type, self.type, - self.name, dataset_type, self.type, self.type, dataset_type)) + """.format(*mescape(self.type, self.type, self.type, self.name, + dataset_type, self.type, dataset_type, dataset_type)) else: query += """ WHERE {}XRef.{}FreezeId = {}Freeze.Id -- cgit v1.2.3