aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-11-17 18:31:59 +0000
committerzsloan2021-11-17 18:31:59 +0000
commit747544906c4d331a8d46ed692070e0f9d335191b (patch)
treea1157cc6074a02bd7bf58780fd228819c9f20aff /wqflask
parent83719648e505747f16281d7e8e14f1003297be5c (diff)
downloadgenenetwork2-747544906c4d331a8d46ed692070e0f9d335191b.tar.gz
Fixes gene global search error caused by some genes not having a symbol (not sure why this is in the DB; seems to have only happened recently)
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/gsearch.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 2516e4fb..bf44408e 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -82,12 +82,13 @@ class GSearch:
this_trait['species'] = line[0]
this_trait['group'] = line[1]
this_trait['tissue'] = line[2]
- this_trait['symbol'] = line[6]
+ this_trait['symbol'] = "N/A"
+ if line[6]:
+ this_trait['symbol'] = line[6]
+ this_trait['description'] = "N/A"
if line[7]:
this_trait['description'] = line[7].decode(
'utf-8', 'replace')
- else:
- this_trait['description'] = "N/A"
this_trait['location_repr'] = 'N/A'
if (line[8] != "NULL" and line[8] != "") and (line[9] != 0):
this_trait['location_repr'] = 'Chr%s: %.6f' % (