about summary refs log tree commit diff
path: root/wqflask/base
diff options
context:
space:
mode:
authorZachary Sloan2013-10-15 15:06:36 -0500
committerZachary Sloan2013-10-15 15:06:36 -0500
commita823e66f8dc742e1608b3e0db6d521d5f63b641a (patch)
tree7e6a52af9b5c78a290329d33ce8df4777a603f26 /wqflask/base
parent34c6c908ac072609a2f923946d474504d3fa0331 (diff)
downloadgenenetwork2-a823e66f8dc742e1608b3e0db6d521d5f63b641a.tar.gz
Changed templates to call the header macro
Correlation page now works with Non-BXD (or whatever group)
or All Samples options
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py14
1 files changed, 8 insertions, 6 deletions
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