From 486b30324d67971f9fa9e741cf1c7f24d286dad2 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 11 Nov 2020 12:57:20 -0600 Subject: - Fixed an issue causing the phenotype abbreviation to not be displayed properly in correlation results - Set default description to N/A when there's no trait description for phenotype traits --- wqflask/wqflask/correlation/show_corr_results.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 07b45860..394c113d 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -522,15 +522,12 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap results_dict['tissue_corr'] = "%0.3f" % float(trait.tissue_corr) results_dict['tissue_pvalue'] = "%0.3e" % float(trait.tissue_pvalue) elif target_dataset.type == "Publish": - results_dict['abbreviation'] = "N/A" - if trait.abbreviation and len(trait.abbreviation) > 20: - results_dict['abbreviation_display'] = trait.abbreviation[:20] + "..." - else: + results_dict['abbreviation_display'] = "N/A" + if trait.abbreviation: results_dict['abbreviation_display'] = trait.abbreviation - # if len(trait.description_display) > 40: - # results_dict['description'] = trait.description_display[:40] + "..." - # else: - results_dict['description'] = trait.description_display + results_dict['description'] = "N/A" + if trait.description_display: + results_dict['description'] = trait.description_display results_dict['authors'] = trait.authors authors_list = trait.authors.split(',') if len(authors_list) > 6: -- cgit v1.2.3