From 809990fca27c0bae3573c0572c384cb6f6f3325d Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 22 May 2015 21:47:48 +0000 Subject: Fixed issue where correlation didn't work for human traits (and probably some others) --- wqflask/base/mrna_assay_tissue_data.py | 6 +++--- wqflask/base/trait.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'wqflask/base') diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py index 1a05fce7..b2c0448a 100755 --- a/wqflask/base/mrna_assay_tissue_data.py +++ b/wqflask/base/mrna_assay_tissue_data.py @@ -51,15 +51,15 @@ class MrnaAssayTissueData(object): query += ''' Symbol in {} group by Symbol) as x inner join TissueProbeSetXRef as t on t.Symbol = x.Symbol - and t.Mean = x.maxmean; + and t.Mean = x.maxmean;http://docs.python.org/2/library/string.html?highlight=lower#string.lower '''.format(in_clause) results = g.db.execute(query).fetchall() for result in results: symbol = result[0] - if symbol in gene_symbols: - #gene_symbols.append(symbol) + if symbol.lower() in [gene_symbol.lower() for gene_symbol in gene_symbols]: + #gene_symbols.append(symbol) symbol = symbol.lower() self.data[symbol].gene_id = result.GeneId diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 8930c917..7f1170a9 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -423,6 +423,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: -- cgit v1.2.3