diff options
author | zsloan | 2020-11-11 12:57:20 -0600 |
---|---|---|
committer | zsloan | 2020-11-11 12:57:20 -0600 |
commit | 486b30324d67971f9fa9e741cf1c7f24d286dad2 (patch) | |
tree | ffa1bbae0a6c02e54a4473c03211a7e5d243c139 /wqflask | |
parent | a40538d382b334b2fcb52c1f9bccbe0533ddbaba (diff) | |
download | genenetwork2-486b30324d67971f9fa9e741cf1c7f24d286dad2.tar.gz |
- 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
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 13 |
1 files changed, 5 insertions, 8 deletions
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: |