diff options
author | uditgulati | 2021-05-10 03:47:21 -0500 |
---|---|---|
committer | BonfaceKilz | 2021-05-10 12:23:57 +0300 |
commit | 0988e1fb7c22e9e9c3cfe148f60863023228fb4b (patch) | |
tree | 1c380692510592fb5b2c54e7ab18dd7b0b14ab7f /wqflask | |
parent | ff5ab1875025efdfa23209e58c651c7816c6b916 (diff) | |
download | genenetwork2-0988e1fb7c22e9e9c3cfe148f60863023228fb4b.tar.gz |
use f string in gsearch
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/gsearch.py | 10 |
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" |