From f5183895e3a6e6914af98a979e437439fdbfecc4 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 14 Dec 2021 05:01:30 +0300 Subject: TO REVERT: Add logging to see data frame --- gn3/computations/partial_correlations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gn3') diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index fbff4df..95eb5e9 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -11,6 +11,7 @@ from typing import Any, Tuple, Union, Sequence import pandas import pingouin +from flask import current_app from scipy.stats import pearsonr, spearmanr from gn3.settings import TEXTDIR @@ -320,7 +321,7 @@ def compute_partial( [__remove_controls_for_target_nones(cont_targ) for cont_targ in conts_targs]) covariates = "z" if datafrm.shape[1] == 3 else [ - col for col in datafrm.columns if col not in ("x", "y")] + col for col in datafrm.columns if col not in ("x", "y")]; current_app.logger.info("DATAFRAME: {}".format(datafrm)) ppc = pingouin.partial_corr( data=datafrm, x="x", y="y", covar=covariates, method=( "pearson" if "pearson" in method.lower() else "spearman")) -- cgit v1.2.3