aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-04-05 15:03:04 -0500
committerzsloan2019-04-05 15:03:04 -0500
commitc8a0287f7059e1d723ae4b57eee88f3a4937d2f2 (patch)
tree762375076be9b5a2dbd4e8a59d23b9689293e0fb /wqflask
parent115aa88a95eab8f8e5c5c41f6fbb552e322314ae (diff)
downloadgenenetwork2-c8a0287f7059e1d723ae4b57eee88f3a4937d2f2.tar.gz
Fixed issue that caused error for phenotype searches (kind of a quick fix and I do a try/except for whether it can build the trait object; ideally I should correctly filter out datasets)
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/gsearch.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 287ffde2..7cd8e543 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -170,8 +170,11 @@ class GSearch(object):
#this_trait = GeneralTrait(dataset=dataset, name=trait_id, get_qtl_info=True, get_sample_info=False)
this_trait['max_lrs_text'] = "N/A"
if this_trait['dataset'] == this_trait['group'] + "Publish":
- trait_ob = GeneralTrait(dataset_name=this_trait['dataset'], name=this_trait['name'], get_qtl_info=True, get_sample_info=False)
- if trait_ob.locus_chr != "" and trait_ob.locus_mb != "":
- this_trait['max_lrs_text'] = "Chr" + str(trait_ob.locus_chr) + ": " + str(trait_ob.locus_mb)
+ try:
+ trait_ob = GeneralTrait(dataset_name=this_trait['dataset'], name=this_trait['name'], get_qtl_info=True, get_sample_info=False)
+ if trait_ob.locus_chr != "" and trait_ob.locus_mb != "":
+ this_trait['max_lrs_text'] = "Chr" + str(trait_ob.locus_chr) + ": " + str(trait_ob.locus_mb)
+ except:
+ this_trait['max_lrs_text'] = "N/A"
self.trait_list.append(this_trait)