aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorzsloan2015-07-01 22:08:31 +0000
committerzsloan2015-07-01 22:08:31 +0000
commit5e446f6b2e32cd48806589a3624cd9aff74f6534 (patch)
tree0b5a45fc48f33103faa8927891acc718a362d4a2 /wqflask/base/trait.py
parentab730e89919f7f7c8a50a97a9a222dbf392297d8 (diff)
parent42172d04c4231f69d67c204b82cf6bc8c7b1bc10 (diff)
downloadgenenetwork2-5e446f6b2e32cd48806589a3624cd9aff74f6534.tar.gz
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'wqflask/base/trait.py')
-rwxr-xr-xwqflask/base/trait.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 7f1170a9..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:
@@ -299,6 +292,7 @@ class GeneralTrait(object):
""" % (self.name, self.dataset.id)
print("query is:", query)
+ assert self.name.isdigit()
trait_info = g.db.execute(query).fetchone()
#XZ, 05/08/2009: Xiaodong add this block to use ProbeSet.Id to find the probeset instead of just using ProbeSet.Name
@@ -337,10 +331,10 @@ class GeneralTrait(object):
trait_info = g.db.execute(query).fetchone()
#print("trait_info is: ", pf(trait_info))
else: #Temp type
- query = """SELECT %s FROM %s WHERE Name = %s
- """ % (string.join(self.dataset.display_fields,','),
- self.dataset.type, self.name)
- trait_info = g.db.execute(query).fetchone()
+ query = """SELECT %s FROM %s WHERE Name = %s"""
+ trait_info = g.db.execute(query,
+ (string.join(self.dataset.display_fields,','),
+ self.dataset.type, self.name)).fetchone()
if trait_info:
self.haveinfo = True