diff options
author | Lei Yan | 2014-07-14 16:23:12 +0000 |
---|---|---|
committer | Lei Yan | 2014-07-14 17:02:01 +0000 |
commit | 214bf0128b8ecdda718983c5563cf34160743758 (patch) | |
tree | 917e7a5ae78dc4ff65dc08d107a0e3ae3a47c67c /wqflask/base/mrna_assay_tissue_data.py | |
parent | 8de6fec18cd98a10c58702c448a1e01e147dc5f7 (diff) | |
parent | fbdbf4b7410185e2a978ecc8e120ae56ff6da0ce (diff) | |
download | genenetwork2-214bf0128b8ecdda718983c5563cf34160743758.tar.gz |
Merge /home/zas1024/gene
Conflicts:
wqflask/wqflask/static/new/javascript/dataset_select_menu.js
wqflask/wqflask/templates/corr_scatter_plot_old.html
Diffstat (limited to 'wqflask/base/mrna_assay_tissue_data.py')
-rwxr-xr-x[-rw-r--r--] | wqflask/base/mrna_assay_tissue_data.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py index be5df657..1a05fce7 100644..100755 --- a/wqflask/base/mrna_assay_tissue_data.py +++ b/wqflask/base/mrna_assay_tissue_data.py @@ -19,6 +19,8 @@ class MrnaAssayTissueData(object): if self.gene_symbols == None: self.gene_symbols = [] + print("self.gene_symbols:", self.gene_symbols) + self.data = collections.defaultdict(Bunch) #self.gene_id_dict ={} @@ -28,7 +30,7 @@ class MrnaAssayTissueData(object): #self.desc_dict = {} #self.probe_target_desc_dict = {} - query = '''select t.Symbol, t.GeneId, t.DataId,t.Chr, t.Mb, t.description, t.Probe_Target_Description + query = '''select t.Symbol, t.GeneId, t.DataId, t.Chr, t.Mb, t.description, t.Probe_Target_Description from ( select Symbol, max(Mean) as maxmean from TissueProbeSetXRef @@ -53,6 +55,7 @@ class MrnaAssayTissueData(object): '''.format(in_clause) results = g.db.execute(query).fetchall() + for result in results: symbol = result[0] if symbol in gene_symbols: @@ -66,7 +69,7 @@ class MrnaAssayTissueData(object): self.data[symbol].description = result.description self.data[symbol].probe_target_description = result.Probe_Target_Description - #print("self.data: ", pf(self.data)) + print("self.data: ", pf(self.data)) ########################################################################### #Input: cursor, symbolList (list), dataIdDict(Dict) @@ -79,6 +82,8 @@ class MrnaAssayTissueData(object): def get_symbol_values_pairs(self): id_list = [self.data[symbol].data_id for symbol in self.data] + print("id_list:", id_list) + symbol_values_dict = {} query = """SELECT TissueProbeSetXRef.Symbol, TissueProbeSetData.value @@ -86,6 +91,8 @@ class MrnaAssayTissueData(object): WHERE TissueProbeSetData.Id IN {} and TissueProbeSetXRef.DataId = TissueProbeSetData.Id""".format(db_tools.create_in_clause(id_list)) + print("TISSUE QUERY:", query) + results = g.db.execute(query).fetchall() for result in results: if result.Symbol.lower() not in symbol_values_dict: |