Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnnData cannot be row-sliced after tl.diffmap #62

Closed
hjp34 opened this issue Jan 6, 2018 · 1 comment
Closed

AnnData cannot be row-sliced after tl.diffmap #62

hjp34 opened this issue Jan 6, 2018 · 1 comment

Comments

@hjp34
Copy link

hjp34 commented Jan 6, 2018

I want to split AnnData after tl.diffmap according to each cell's library. But it appears that row-slicing AnnData after diffmap, dpt, or louvain gives the error message AttributeError: 'AnnData' object has no attribute '_n_obs'. But AnnData.X and AnnData.obs can be sliced. Could you please give me advice?

>>> adata = sc.read_10x_h5('filtered_gene_bc_matrices_h5.h5', 'mm10')
>>> scanpy.api.tl.diffmap(adata)
>>> adata_diffmap[:, 0]
View of AnnData object with n_obs × n_vars = 5000 × 1
>>> adata_diffmap[0, :] 
AttributeError: 'AnnData' object has no attribute '_n_obs'
@falexwolf
Copy link
Member

falexwolf commented Jan 6, 2018

Sorry about this bug in AnnData views, which have only recently been introduced. Is fixed in anndata 0.4.4 pip install anndata --upgrade and on the master branch: scverse/anndata@ba9b3ee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants