From c8a0287f7059e1d723ae4b57eee88f3a4937d2f2 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 5 Apr 2019 15:03:04 -0500 Subject: 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) --- wqflask/wqflask/gsearch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'wqflask') 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) -- cgit v1.2.3