From efe6aa9d87db49db6daec695ec10a81fbeacc5a4 Mon Sep 17 00:00:00 2001 From: dbdimitrov Date: Sat, 21 Sep 2024 09:09:21 +0200 Subject: [PATCH] address index issue #143 --- liana/method/_pipe_utils/_pre.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/liana/method/_pipe_utils/_pre.py b/liana/method/_pipe_utils/_pre.py index 1165e25..634cebc 100644 --- a/liana/method/_pipe_utils/_pre.py +++ b/liana/method/_pipe_utils/_pre.py @@ -101,12 +101,11 @@ def prep_check_adata(adata: AnnData, layer=layer, verbose=verbose) if use_raw & (layer is None): - var = DataFrame(index=adata.raw.var_names) + var = DataFrame(index=list(adata.raw.var_names)) else: - var = DataFrame(index=adata.var_names) + var = DataFrame(index=list(adata.var_names)) if obsm is not None: - # discard any instances of AnnData if in obsm obsm = {k: v for k, v in obsm.items() if not isinstance(v, AnnData)} adata = sc.AnnData(X=X,