diff options
author | Lei Yan | 2015-07-10 20:12:00 +0000 |
---|---|---|
committer | Lei Yan | 2015-07-10 20:12:00 +0000 |
commit | aa159a17785cc415e81346963aa76f05f5f9d4ad (patch) | |
tree | ae0502dac39d8cf20115b58817df4931a03b727c /wqflask/base/trait.py | |
parent | 239c5ff97a88bd9ae3c439ca244daca2696fe68b (diff) | |
parent | 840285e3533790760b763aaa43d3099f9b0a5d69 (diff) | |
download | genenetwork2-aa159a17785cc415e81346963aa76f05f5f9d4ad.tar.gz |
Merge https://github.com/genenetwork/genenetwork2
Diffstat (limited to 'wqflask/base/trait.py')
-rwxr-xr-x | wqflask/base/trait.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 8930c917..ff80795c 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: @@ -298,7 +291,7 @@ class GeneralTrait(object): PublishFreeze.Id = %s """ % (self.name, self.dataset.id) - print("query is:", query) + print("query is:", query) 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 +330,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 @@ -423,6 +416,8 @@ class GeneralTrait(object): if result: self.locus_chr = result[0] self.locus_mb = result[1] + else: + self.locus = self.locus_chr = self.locus_mb = "" else: self.locus = self.locus_chr = self.locus_mb = "" else: |