From eff7e0b649c88d6886c3cfce820327872afb7c3b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 8 Dec 2021 07:22:13 +0300 Subject: Provide group from primary trait Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * From the collections page, the group is not present, so this commit retrieves the group value from the primary trait. --- gn3/computations/partial_correlations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 231b0a7..ced44a4 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -517,7 +517,7 @@ def tissue_correlation_by_list( def partial_correlations_entry(# pylint: disable=[R0913, R0914, R0911] conn: Any, primary_trait_name: str, control_trait_names: Tuple[str, ...], method: str, - criteria: int, group: str, target_db_name: str) -> dict: + criteria: int, target_db_name: str) -> dict: """ This is the 'ochestration' function for the partial-correlation feature. @@ -533,6 +533,7 @@ def partial_correlations_entry(# pylint: disable=[R0913, R0914, R0911] corr_min_informative = 4 primary_trait = retrieve_trait_info(threshold, primary_trait_name, conn) + group = primary_trait["group"] primary_trait_data = retrieve_trait_data(primary_trait, conn) primary_samples, primary_values, _primary_variances = export_informative( primary_trait_data) -- cgit v1.2.3