aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/webqtlTrait.py
diff options
context:
space:
mode:
authorZachary Sloan2012-08-28 16:05:09 -0500
committerZachary Sloan2012-08-28 16:05:09 -0500
commit4cc46d84810ca9492e9a38e1a1f88ab36d214791 (patch)
tree3b67781f4fc241ca9e95bee0d0f2170463edf4a9 /wqflask/base/webqtlTrait.py
parent31aa6fb32e4ae4af18e177a3777a19bbde3e063d (diff)
downloadgenenetwork2-4cc46d84810ca9492e9a38e1a1f88ab36d214791.tar.gz
Various changes related to the webqtlCaseData object and the way values/variances/num_cases are called in DataEditingPage.py
Diffstat (limited to 'wqflask/base/webqtlTrait.py')
-rwxr-xr-xwqflask/base/webqtlTrait.py52
1 files changed, 28 insertions, 24 deletions
diff --git a/wqflask/base/webqtlTrait.py b/wqflask/base/webqtlTrait.py
index 23b98238..337493ef 100755
--- a/wqflask/base/webqtlTrait.py
+++ b/wqflask/base/webqtlTrait.py
@@ -225,7 +225,10 @@ class webqtlTrait:
- def retrieveData(self, strainlist=[]):
+ def retrieveData(self, strainlist=None):
+
+ if strainlist == None:
+ strainlist = []
assert self.db and self.cursor
if self.db.type == 'Temp':
@@ -328,32 +331,33 @@ class webqtlTrait:
self.cursor.execute(query)
results = self.cursor.fetchall()
self.data.clear()
+
if results:
self.mysqlid = results[0][-1]
- if strainlist:
- for item in results:
- if item[0] in strainlist:
- val = item[1]
- if val != None:
- var = item[2]
- ndata = None
- if self.db.type in ('Publish', 'Temp'):
- ndata = item[3]
- self.data[item[0]] = webqtlCaseData(val, var, ndata)
+ #if strainlist:
+ for item in results:
+ #name, value, variance, num_cases = item
+ if not strainlist or (strainlist and name in strainlist):
+ #if value != None:
+ # num_cases = None
+ # if self.db.type in ('Publish', 'Temp'):
+ # ndata = item[3]
+ name = item[0]
+ self.data[name] = webqtlCaseData(*item) #name, value, variance, num_cases)
#end for
- else:
- for item in results:
- val = item[1]
- if val != None:
- var = item[2]
- ndata = None
- if self.db.type in ('Publish', 'Temp'):
- ndata = item[3]
- self.data[item[0]] = webqtlCaseData(val, var, ndata)
- #end for
- #end if
- else:
- pass
+ # else:
+ # for item in results:
+ # val = item[1]
+ # if val != None:
+ # var = item[2]
+ # ndata = None
+ # if self.db.type in ('Publish', 'Temp'):
+ # ndata = item[3]
+ # self.data[item[0]] = webqtlCaseData(val, var, ndata)
+ # #end for
+ # #end if
+ #else:
+ # pass
def keys(self):
return self.__dict__.keys()