aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-14 05:01:30 +0300
committerFrederick Muriuki Muriithi2021-12-14 05:01:30 +0300
commitf5183895e3a6e6914af98a979e437439fdbfecc4 (patch)
tree0e58e7d34253cf5f1d7fdfc023ad72580beb0fa0 /gn3
parent1a46021a37ca23fe9893fd4ac9ac9c1d4066884b (diff)
downloadgenenetwork3-f5183895e3a6e6914af98a979e437439fdbfecc4.tar.gz
TO REVERT: Add logging to see data frame
Diffstat (limited to 'gn3')
-rw-r--r--gn3/computations/partial_correlations.py3
1 files changed, 2 insertions, 1 deletions
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"))