aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-09 06:25:10 +0300
committerFrederick Muriuki Muriithi2021-12-09 09:19:57 +0300
commitc5f78421c50dc7c9e4801ad7bf9583674c29e1ba (patch)
tree46bde68b01a1d56117516d51b39143dbee4b07c8 /gn3/computations
parentdd55b1376cbff6c9870b3173f8dc6207505a57c6 (diff)
downloadgenenetwork3-c5f78421c50dc7c9e4801ad7bf9583674c29e1ba.tar.gz
Prevent error on no result. Fix indexing
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * If the dataset name is not found, don't cause an exception, instead, return the provided search name. * Use the correct inner object
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/partial_correlations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index ced44a4..719c605 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -309,7 +309,7 @@ def compute_partial(
primary,
tuple(targ for targ in targ_vals if targ is not None),
tuple(cont for i, cont in enumerate(control_vals)
- if target[i] is not None))
+ if target[0][i] is not None))
covariates = "z" if datafrm.shape[1] == 3 else [
col for col in datafrm.columns if col not in ("x", "y")]
ppc = pingouin.partial_corr(