From fd1027533348f186c8597164b4d5d19d7ee14b76 Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Wed, 12 Jun 2024 21:32:45 -0700 Subject: [PATCH 1/9] Change alpha diversity metric --- microsetta_interface/templates/new_results_page.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsetta_interface/templates/new_results_page.jinja2 b/microsetta_interface/templates/new_results_page.jinja2 index b4c493c3..b801ad5a 100644 --- a/microsetta_interface/templates/new_results_page.jinja2 +++ b/microsetta_interface/templates/new_results_page.jinja2 @@ -1036,7 +1036,7 @@ } // We override the default alpha_metric from state for this page. - let alpha_metric = "observed_features" + let alpha_metric = "shannon" for (let key in POST_DATA) { $.ajax( { From c48524347606bb84916fafe7eda9a691cd6c7096 Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Wed, 12 Jun 2024 21:37:07 -0700 Subject: [PATCH 2/9] Round alpha diversity metric --- microsetta_interface/templates/new_results_page.jinja2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsetta_interface/templates/new_results_page.jinja2 b/microsetta_interface/templates/new_results_page.jinja2 index b801ad5a..266e2531 100644 --- a/microsetta_interface/templates/new_results_page.jinja2 +++ b/microsetta_interface/templates/new_results_page.jinja2 @@ -1048,7 +1048,7 @@ data: JSON.stringify(POST_DATA[key]), contentType: "application/json", success: function (data) { - let display = data["group_summary"]["median"] + let display = Math.round(data["group_summary"]["median"] * 100)/100; $(SELECTORS[key]).text(display).removeClass("spinner-grow spinner-grow-sm"); } }).fail(function (result, textStatus, errorThrown) { @@ -1064,7 +1064,7 @@ method: "GET", contentType: "application/json", success: function (data) { - let display = data["data"] + let display = Math.round(data["data"] * 100)/100; $("#diversity_in_sample").text(display).removeClass("spinner-grow spinner-grow-sm"); } }).fail(function (result, textStatus, errorThrown) { From cece0e73a5e624b5fa67fe6a24667a423ee7b8fc Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Wed, 12 Jun 2024 21:42:23 -0700 Subject: [PATCH 3/9] Flag text to update --- microsetta_interface/templates/new_results_page.jinja2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/microsetta_interface/templates/new_results_page.jinja2 b/microsetta_interface/templates/new_results_page.jinja2 index 266e2531..f34d1f7e 100644 --- a/microsetta_interface/templates/new_results_page.jinja2 +++ b/microsetta_interface/templates/new_results_page.jinja2 @@ -13,6 +13,10 @@