diff options
author | Frederick Muriuki Muriithi | 2021-12-13 15:57:46 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-12-13 15:57:46 +0300 |
commit | 397316b5cd5c3572962bd53a331f5d23429d8ddc (patch) | |
tree | df8f99daba105b5e3452e1c215983d76a04286b7 /gn3/computations | |
parent | 131394ac737aac7e6fced7cfb07f9e9d538b9506 (diff) | |
download | genenetwork3-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.
Diffstat (limited to 'gn3/computations')
-rw-r--r-- | gn3/computations/partial_correlations.py | 6 |
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 + } |