aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorLei Yan2013-10-08 17:50:08 -0500
committerLei Yan2013-10-08 17:50:08 -0500
commit9173f1e03f51cb141b0efa35b5e81c632b9a2689 (patch)
tree0655276dbfce12857462dfe0e392951d6b8de23b /wqflask/base
parent58327f74caa0616b1f6401a1154c03e87ae5e7bf (diff)
downloadgenenetwork2-9173f1e03f51cb141b0efa35b5e81c632b9a2689.tar.gz
Literature correlation works when it is selected as the sorted
correlation type (that is, when it is run again all traits in a database) Added a function to data_set.py that gets all the gene_ids in the data set. Not sure if having a separate function for getting the gene_ids and another for getting the gene symbols makes sense.
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 5d21c901..16f9da5d 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -1078,7 +1078,20 @@ class MrnaAssayDataSet(DataSet):
def retrieve_gene_symbols(self):
query = """
- select ProbeSet.Name, ProbeSet.Symbol
+ select ProbeSet.Name, ProbeSet.Symbol, ProbeSet.GeneId
+ from ProbeSet,ProbeSetXRef
+ where ProbeSetXRef.ProbeSetFreezeId = %s and
+ ProbeSetXRef.ProbeSetId=ProbeSet.Id;
+ """ % (self.id)
+ results = g.db.execute(query).fetchall()
+ symbol_dict = {}
+ for item in results:
+ symbol_dict[item[0]] = item[1]
+ return symbol_dict
+
+ def retrieve_gene_ids(self):
+ query = """
+ select ProbeSet.Name, ProbeSet.GeneId
from ProbeSet,ProbeSetXRef
where ProbeSetXRef.ProbeSetFreezeId = %s and
ProbeSetXRef.ProbeSetId=ProbeSet.Id;