AttributeError: 'AnnData' object has no attribute 'obs_vector'
See original GitHub issue… AttributeError: ‘AnnData’ object has no attribute ‘obs_vector’, when pl.umap
, pl.violin
...sc.pl.violin(adata, ['n_genes', 'n_counts', 'percent_mito'],jitter=0.4, multi_panel=True)
...AttributeError Traceback (most recent call last)
<ipython-input-41-ed9365d2081e> in <module>
----> 1 sc.pl.violin(adata, ['n_genes', 'n_counts', 'percent_mito'],jitter=0.4, multi_panel=True)
~/anaconda3/envs/myenv/lib/python3.7/site-packages/scanpy/plotting/_anndata.py in violin(adata, keys, groupby, log, use_raw, stripplot, jitter, size, scale, order, multi_panel, show, xlabel, rotation, save, ax, **kwds)
636 obs_df = get.obs_df(adata, keys=[groupby] + keys, use_raw=use_raw)
637 else:
--> 638 obs_df = get.obs_df(adata, keys=keys, use_raw=use_raw)
639 if groupby is None:
640 obs_tidy = pd.melt(obs_df, value_vars=keys)
~/anaconda3/envs/myenv/lib/python3.7/site-packages/scanpy/get.py in obs_df(adata, keys, obsm_keys, layer, gene_symbols, use_raw)
160 for k, l in zip(keys, lookup_keys):
161 if not use_raw or k in adata.obs.columns:
--> 162 df[k] = adata.obs_vector(l, layer=layer)
163 else:
164 df[k] = adata.raw.obs_vector(l)
AttributeError: 'AnnData' object has no attribute 'obs_vector'
Versions:
…scanpy==1.4.3 anndata==0.6.20 umap==0.3.9 numpy==1.17.0 scipy==1.3.0 pandas==0.23.4 scikit-learn==0.21.3 statsmodels==0.9.0 python-igraph==0.7.1 louvain==0.6.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
AttributeError: 'AnnData' object has no attribute 'obs_vector ...
It is not available in conda and with 1.4.4.post1 I'm getting the same error. Thanks! conda search -c bioconda scanpy Loading channels: done...
Read more >AttributeError: 'AnnData' object has no attribute '_X' - scanpy
Subset AnnData object based on categorical value: AttributeError: 'AnnData' object has no attribute '_X' Is it possible to subset a loom object based...
Read more >Concatenation — anndata 0.9.0.dev35+g6473f20 ...
Concatenation is when we keep all sub elements of each object, and stack these elements in an ordered way. Merging is combining a...
Read more >Concatenate won't work - Help - Scanpy
Hi everyone. When I marge my 4 own visium samples, I got “AttributeError: 'str' object has no attribute 'shape'”.
Read more >anndata for R • anndata
A reticulate wrapper for the Python package anndata. Provides a scalable way of keeping track of data and learned annotations. Used to read...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That worked, thank you very much for your help!
@massonix Latest version is available on PyPI, so you can try installing via pip install.