Skip to content

Commit

Permalink
address index issue #143
Browse files Browse the repository at this point in the history
  • Loading branch information
dbdimitrov committed Sep 21, 2024
1 parent b91925d commit efe6aa9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions liana/method/_pipe_utils/_pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit efe6aa9

Please sign in to comment.