aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorSam2013-10-15 18:24:09 -0500
committerSam2013-10-15 18:24:09 -0500
commit52d2053b8d424f1366b016fedd9e8b407c6d484f (patch)
treeb3598699f428d63667ff9cfd9a07bf259f8197a2 /wqflask/base
parent5b7d03c4af45a6e9b556368746d3ff04b6942a57 (diff)
parenta823e66f8dc742e1608b3e0db6d521d5f63b641a (diff)
downloadgenenetwork2-52d2053b8d424f1366b016fedd9e8b407c6d484f.tar.gz
Merge /home/zas1024/gene
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