aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/gsearch.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 4024fa7a..12cd2792 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -121,10 +121,8 @@ class GSearch:
continue
max_lrs_text = "N/A"
- if this_trait['locus_chr'] != None and this_trait['locus_mb'] != None:
- max_lrs_text = "Chr" + \
- str(this_trait['locus_chr']) + \
- ": " + str(this_trait['locus_mb'])
+ if this_trait['locus_chr'] and this_trait['locus_mb']:
+ max_lrs_text = f"Chr{str(this_trait['locus_chr']}): {str(this_trait['locus_mb'])}"
this_trait['max_lrs_text'] = max_lrs_text
trait_list.append(this_trait)
@@ -271,8 +269,8 @@ class GSearch:
this_trait['max_lrs_text'] = "N/A"
if this_trait['dataset'] == this_trait['group'] + "Publish":
try:
- if this_trait['locus_chr'] != None and this_trait['locus_mb'] != None:
- this_trait['max_lrs_text'] = "Chr" + str(this_trait['locus_chr']) + ": " + str(this_trait['locus_mb'])
+ if this_trait['locus_chr'] and this_trait['locus_mb']:
+ this_trait['max_lrs_text'] = f"Chr{str(this_trait['locus_chr']}): {str(this_trait['locus_mb'])}"
except:
this_trait['max_lrs_text'] = "N/A"