aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2015-05-22 21:47:48 +0000
committerzsloan2015-05-22 21:47:48 +0000
commit809990fca27c0bae3573c0572c384cb6f6f3325d (patch)
treeacc0c8f346629716d1f2b6d5ecda1c3226447187
parentcce1715090f0ef7579881c0b9de49b3a49f5a249 (diff)
downloadgenenetwork2-809990fca27c0bae3573c0572c384cb6f6f3325d.tar.gz
Fixed issue where correlation didn't work for human traits (and probably some others)
-rwxr-xr-xwqflask/base/mrna_assay_tissue_data.py6
-rwxr-xr-xwqflask/base/trait.py2
-rwxr-xr-xwqflask/wqflask/templates/correlation_page.html10
3 files changed, 14 insertions, 4 deletions
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:
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 169371be..74919c88 100755
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -85,8 +85,16 @@
<td>{{ trait.description }} <br><br> <b>Aliases</b>: {{ trait.alias }}</td>
<td>Chr{{ trait.chr }}: {{'%0.6f'|format(trait.mb) if trait.mb != None }}</td>
<td>{{'%0.3f'|format(trait.mean)}}</td>
+ {% if trait.lrs == "" or trait.lrs == 0.000 %}
+ <td>--</td>
+ {% else %}
<td>{{'%0.3f'|format(trait.lrs)}}</td>
- <td>Chr{{ trait.locus_chr }}: {{'%0.3f'|format(trait.locus_mb) }}</td>
+ {% endif %}
+ {% if trait.locus_mb == "" %}
+ <td>--</td>
+ {% else %}
+ <td>Chr{{ trait.locus_chr if trait.locus_chr != None }}: {{'%0.3f'|format(trait.locus_mb)}}</td>
+ {% endif %}
<td><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
<td>{{ trait.num_overlap }}</td>
<td>{{'%0.3e'|format(trait.sample_p)}}</td>