From 5a2284984e75a4a25debdfcbdc8c2951a799c4cb Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 15 Dec 2020 11:52:58 -0600 Subject: Changed LRS to LOD score for correlation page table --- wqflask/wqflask/correlation/show_corr_results.py | 13 ++++++++----- wqflask/wqflask/templates/correlation_page.html | 6 +++--- wqflask/wqflask/templates/search_result_page.html | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 0c1cea0e..8536ce51 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -493,14 +493,15 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap results_dict['description'] = "N/A" results_dict['location'] = trait.location_repr results_dict['mean'] = "N/A" - results_dict['lrs_score'] = "N/A" results_dict['additive'] = "N/A" if bool(trait.description_display): results_dict['description'] = trait.description_display if bool(trait.mean): results_dict['mean'] = f"{float(trait.mean):.3f}" - if trait.LRS_score_repr != "N/A": - results_dict['lrs_score'] = f"{float(trait.LRS_score_repr):.1f}" + try: + trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}" + except: + trait_dict['lod_score'] = "N/A" results_dict['lrs_location'] = trait.LRS_location_repr if bool(trait.additive): results_dict['additive'] = f"{float(trait.additive):.3f}" @@ -544,8 +545,10 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap else: results_dict['pubmed_link'] = trait.pubmed_link results_dict['pubmed_text'] = trait.pubmed_text - - results_dict['lrs_score'] = trait.LRS_score_repr + try: + trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}" + except: + trait_dict['lod_score'] = "N/A" results_dict['lrs_location'] = trait.LRS_location_repr if bool(trait.additive): results_dict['additive'] = f"{float(trait.additive):.3f}" diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index db04a530..a9a3a2ca 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -355,9 +355,9 @@ 'orderSequence': [ "desc", "asc"] }, { - 'title': "Peak LOD ", + 'title': "Peak  LOD", 'type': "natural-minus-na", - 'data': "lrs_score", + 'data': "lod_score", 'width': "60px", 'orderSequence': [ "desc", "asc"] }, @@ -457,7 +457,7 @@ { 'title': "Peak  LOD", 'type': "natural-minus-na", - 'data': "lrs_score", + 'data': "lod_score", 'width': "60px", 'orderSequence': [ "desc", "asc"] }, diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 4a3080a3..f2334512 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -279,7 +279,7 @@ { 'title': "Peak  LOD", 'type': "natural-minus-na", - 'data': "lrs_score", + 'data': "lod_score", 'width': "60px", 'orderSequence': [ "desc", "asc"] }, @@ -348,7 +348,7 @@ { 'title': "Peak  LOD", 'type': "natural-minus-na", - 'data': "lrs_score", + 'data': "lod_score", 'width': "60px", 'orderSequence': [ "desc", "asc"] }, -- cgit v1.2.3