From 397316b5cd5c3572962bd53a331f5d23429d8ddc Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 13 Dec 2021 15:57:46 +0300 Subject: Return the primary and control traits in addition to results Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * In addition to the partial correlation results, this commit enables the return of the chosen primary trait and the selected control traits. This data is required for presentation on the results page. --- gn3/computations/partial_correlations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index bda6ba2..d05011a 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -702,4 +702,8 @@ def partial_correlations_entry(# pylint: disable=[R0913, R0914, R0911] for item in sorted_correlations[:min(criteria, len(all_correlations))])) - return trait_list + return { + "primary_trait": primary_trait, + "control_traits": cntrl_traits, + "correlations": trait_list + } -- cgit v1.2.3