aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-13 15:57:46 +0300
committerFrederick Muriuki Muriithi2021-12-13 15:57:46 +0300
commit397316b5cd5c3572962bd53a331f5d23429d8ddc (patch)
treedf8f99daba105b5e3452e1c215983d76a04286b7
parent131394ac737aac7e6fced7cfb07f9e9d538b9506 (diff)
downloadgenenetwork3-397316b5cd5c3572962bd53a331f5d23429d8ddc.tar.gz
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.
-rw-r--r--gn3/computations/partial_correlations.py6
1 files changed, 5 insertions, 1 deletions
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
+ }