diff options
author | zsloan | 2015-08-26 22:15:25 +0000 |
---|---|---|
committer | zsloan | 2015-08-26 22:15:25 +0000 |
commit | 3f1049827499e1647769d37f27aabf524dbe9690 (patch) | |
tree | 0394d2f56d21766c1f21aacd247dcb5c46142fa8 /wqflask/base/data_set.py | |
parent | f8d0103821cfcf59890551f9876d0eba959da80e (diff) | |
download | genenetwork2-3f1049827499e1647769d37f27aabf524dbe9690.tar.gz |
Fixed issue with colums for the gene global search (still need to change for phenotype)
Fixed issue where LRS and LOD are sometimes labeled incorrectly
Changed the header of the trait page
Added link to GN1 in header
Fixxed an issue that made permutations not work with pylmm
Fixed "sign in" button when creating a collection while not logged in
Diffstat (limited to 'wqflask/base/data_set.py')
-rwxr-xr-x | wqflask/base/data_set.py | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index c60efe65..e98258f6 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -559,29 +559,39 @@ class DataSet(object): This is not meant to retrieve the data set info if no name at all is passed. """ - - query_args = tuple(escape(x) for x in ( - (self.type + "Freeze"), - str(webqtlConfig.PUBLICTHRESH), - self.name, - self.name, - self.name)) - print("query_args are:", query_args) - - #print(""" - # SELECT Id, Name, FullName, ShortName - # FROM %s - # WHERE public > %s AND - # (Name = '%s' OR FullName = '%s' OR ShortName = '%s') - # """ % (query_args)) try: - self.id, self.name, self.fullname, self.shortname = g.db.execute(""" - SELECT Id, Name, FullName, ShortName - FROM %s - WHERE public > %s AND - (Name = '%s' OR FullName = '%s' OR ShortName = '%s') - """ % (query_args)).fetchone() + if self.type == "ProbeSet": + query_args = tuple(escape(x) for x in ( + str(webqtlConfig.PUBLICTHRESH), + self.name, + self.name, + self.name)) + + self.id, self.name, self.fullname, self.shortname, self.tissue = g.db.execute(""" + SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName, ProbeSetFreeze.ShortName, Tissue.Name + FROM ProbeSetFreeze, ProbeFreeze, Tissue + WHERE ProbeSetFreeze.public > %s AND + ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id AND + ProbeFreeze.TissueId = Tissue.Id AND + (ProbeSetFreeze.Name = '%s' OR ProbeSetFreeze.FullName = '%s' OR ProbeSetFreeze.ShortName = '%s') + """ % (query_args)).fetchone() + else: + query_args = tuple(escape(x) for x in ( + (self.type + "Freeze"), + str(webqtlConfig.PUBLICTHRESH), + self.name, + self.name, + self.name)) + + self.tissue = "N/A" + self.id, self.name, self.fullname, self.shortname = g.db.execute(""" + SELECT Id, Name, FullName, ShortName + FROM %s + WHERE public > %s AND + (Name = '%s' OR FullName = '%s' OR ShortName = '%s') + """ % (query_args)).fetchone() + except TypeError: print("Dataset {} is not yet available in GeneNetwork.".format(self.name)) pass |