Unable to import scvelo
jjia1 opened this issue · 2 comments
Hello,
Thanks for developing scvelo.
Just some background, I wanted to perform RNA velocity analysis on my object but I had been working in Seurat initially. I performed some data conversion from Seurat into Scanpy using sceasy
or some other packages.
I was trying to get the tool running, but I'm unable to import the package when using the newest version if i use the command:
pip install git+https://github.com/theislab/scvelo
This is the output from import scvelo as scv
with version 0.3.1
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[2], [line 2](vscode-notebook-cell:?execution_count=2&line=2)
[1](vscode-notebook-cell:?execution_count=2&line=1) # if any installation issues, remember to use lower version of scvelo (like 0.2.4)
----> [2](vscode-notebook-cell:?execution_count=2&line=2) import scvelo as scv
File [~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:6](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:6)
[3](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:3) from scanpy import read, read_loom
[5](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:5) from scvelo import datasets, logging
----> [6](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:6) from scvelo import plotting as pl
[7](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:7) from scvelo import preprocessing as pp
[8](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/__init__.py:8) from scvelo import settings
File [~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:3](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:3)
[1](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:1) from scanpy.plotting import paga_compare, rank_genes_groups
----> [3](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:3) from .gridspec import gridspec
[4](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:4) from .heatmap import heatmap
[5](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/__init__.py:5) from .paga import paga
File [~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:6](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:6)
[3](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:3) import matplotlib.pyplot as pl
[5](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:5) # todo: auto-complete and docs wrapper
----> [6](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:6) from .scatter import scatter
[7](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:7) from .utils import get_figure_params, hist
[8](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.8/site-packages/scvelo/plotting/gridspec.py:8) from .velocity_embedding import velocity_embedding
...
[69](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/.local/lib/python3.8/site-packages/optax/contrib/dadapt_adamw.py:69) A `GradientTransformation` object.
[70](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/.local/lib/python3.8/site-packages/optax/contrib/dadapt_adamw.py:70) """
[72](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/.local/lib/python3.8/site-packages/optax/contrib/dadapt_adamw.py:72) def init_fn(params: base.Params) -> DAdaptAdamWState:
TypeError: 'type' object is not subscriptable
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?a835cbc0-31ed-47ae-95c1-330852a6d7e4) or open in a [text editor](command:workbench.action.openLargeOutput?a835cbc0-31ed-47ae-95c1-330852a6d7e4). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
However if I downgrade to an older version, specifically 0.2.4, with
pip install scvelo==0.2.4.0
I'm able to import the package but I get errors down the line when trying to run the package.
Doesn't matter what command I use, I get the following error. As seen when i use
scv.pl.proportions(velo)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[15], [line 1](vscode-notebook-cell:?execution_count=15&line=1)
----> [1](vscode-notebook-cell:?execution_count=15&line=1) scv.pl.proportions(velo, layers = ['spliced', 'unspliced'])
File [~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62), in proportions(adata, groupby, layers, highlight, add_labels_pie, add_labels_bar, fontsize, figsize, dpi, use_raw, show, save)
[60](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:60) layers = ["spliced", "unspliced", "ambigious"]
[61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:61) layers_keys = [key for key in layers if key in adata.layers.keys()]
---> [62](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62) counts_layers = [sum(adata.layers[key], axis=1) for key in layers_keys]
[64](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:64) if use_raw:
[65](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:65) ikey, obs = "initial_size_", adata.obs
File [~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62), in <listcomp>(.0)
[60](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:60) layers = ["spliced", "unspliced", "ambigious"]
[61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:61) layers_keys = [key for key in layers if key in adata.layers.keys()]
---> [62](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:62) counts_layers = [sum(adata.layers[key], axis=1) for key in layers_keys]
[64](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:64) if use_raw:
[65](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/plotting/proportions.py:65) ikey, obs = "initial_size_", adata.obs
File [~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:124](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:124), in sum(a, axis)
[107](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:107) def sum(a: Union[ndarray, spmatrix], axis: Optional[int] = None) -> ndarray:
[108](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:108) """Sum array elements over a given axis.
[109](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:109)
[110](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:110) Arguments
(...)
...
--> [124](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:124) if a.ndim == 1:
[125](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:125) axis = 0
[127](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/rnavelo/lib/python3.8/site-packages/scvelo/core/_arithmetic.py:127) with warnings.catch_warnings():
AttributeError: 'AnnData' object has no attribute 'ndim'
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?108bb7d5-d72b-4eb0-9f16-3e0a647f73d3) or open in a [text editor](command:workbench.action.openLargeOutput?108bb7d5-d72b-4eb0-9f16-3e0a647f73d3). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
This is what my data looks like as an AnnData object
AnnData object with n_obs × n_vars = 74037 × 20881
obs: 'nCount_RNA', 'nFeature_RNA', 'orig.ident', 'mitochondrial_fraction', 'ribosomal_fraction', 'label', 'nCount_SCT', 'nFeature_SCT', 'seurat_clusters', 'cell_lineage', 'SCT_snn_res.0.6', 'celltype', 'celltype_highres', 'experiment', 'condition', 'timepoint', 'condition_timepoint', 'cell_group', 'gene_name', 'nCount_unspliced', 'nFeature_unspliced'
var: 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'celltype', 'celltype_colors', 'celltype_highres_colors', 'celltypehighres_colors', 'condition_colors', 'condition_timepoint_colors', 'experiment_colors', 'hvg', 'log1p', 'neighbors', 'pca', 'seurat_clusters_colors', 'timepoint_colors', 'tsne', 'umap'
obsm: 'X_pca', 'X_tsne', 'X_umap', 'X_umap2'
varm: 'PCs'
layers: 'spliced', 'unspliced'
obsp: 'connectivities', 'distances'
I solved the import issue. If I upgraded to Python 3.9, the dependency issue was resolved but I still run into the ndim issue with my dataset.
velo
AnnData object with n_obs × n_vars = 74037 × 20881
obs: 'nCount_RNA', 'nFeature_RNA', 'orig.ident', 'mitochondrial_fraction', 'ribosomal_fraction', 'label', 'nCount_SCT', 'nFeature_SCT', 'seurat_clusters', 'cell_lineage', 'SCT_snn_res.0.6', 'celltype', 'celltype_highres', 'experiment', 'condition', 'timepoint', 'condition_timepoint', 'cell_group', 'gene_name', 'nCount_unspliced', 'nFeature_unspliced'
var: 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'celltype', 'celltype_colors', 'celltype_highres_colors', 'celltypehighres_colors', 'condition_colors', 'condition_timepoint_colors', 'experiment_colors', 'hvg', 'log1p', 'neighbors', 'pca', 'seurat_clusters_colors', 'timepoint_colors', 'tsne', 'umap'
obsm: 'X_pca', 'X_tsne', 'X_umap', 'X_umap2'
varm: 'PCs'
layers: 'spliced', 'unspliced'
obsp: 'connectivities', 'distances'
scv.pl.proportions(velo)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[13], [line 1](vscode-notebook-cell:?execution_count=13&line=1)
----> [1](vscode-notebook-cell:?execution_count=13&line=1) scv.pl.proportions(velo)
File [~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61), in proportions(adata, groupby, layers, highlight, add_labels_pie, add_labels_bar, fontsize, figsize, dpi, use_raw, show, save)
[59](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:59) layers = ["spliced", "unspliced", "ambiguous"]
[60](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:60) layers_keys = [key for key in layers if key in adata.layers.keys()]
---> [61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61) counts_layers = [sum(adata.layers[key], axis=1) for key in layers_keys]
[63](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:63) if use_raw:
[64](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:64) ikey, obs = "initial_size_", adata.obs
File [~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61), in <listcomp>(.0)
[59](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:59) layers = ["spliced", "unspliced", "ambiguous"]
[60](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:60) layers_keys = [key for key in layers if key in adata.layers.keys()]
---> [61](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:61) counts_layers = [sum(adata.layers[key], axis=1) for key in layers_keys]
[63](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:63) if use_raw:
[64](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/plotting/proportions.py:64) ikey, obs = "initial_size_", adata.obs
File [~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:119](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:119), in sum(a, axis)
[103](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:103) def sum(a: Union[ndarray, spmatrix], axis: Optional[int] = None) -> ndarray:
[104](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:104) """Sum array elements over a given axis.
[105](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:105)
[106](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:106) Arguments:
(...)
...
--> [119](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:119) if a.ndim == 1:
[120](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:120) axis = 0
[122](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2241746c6173227d.vscode-resource.vscode-cdn.net/mnt/atlas_local/jonathan/home/projects/Sivan_NASA/scRNA/main/qc/rnavelocity/integration/~/miniconda3/envs/scvelo/lib/python3.9/site-packages/scvelo/core/_arithmetic.py:122) with warnings.catch_warnings():
AttributeError: 'AnnData' object has no attribute 'ndim'
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?f37c88c8-0d49-41c8-bb31-882d9349a274) or open in a [text editor](command:workbench.action.openLargeOutput?f37c88c8-0d49-41c8-bb31-882d9349a274). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
Wondering if there is some issue from converting my data from a Seurat object into an AnnData object.
Here is my output for package versions
scv.logging.print_versions()
scvelo==0.3.1 scanpy==1.9.8 anndata==0.10.6 loompy==3.0.7 numpy==1.26.4 scipy==1.12.0 matplotlib==3.8.3 sklearn==1.4.1.post1 pandas==2.2.1
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.
I fixed the issue. I did not realize that I did not set the spliced and unspliced layers equal to the count matrix but rather I had set it as the entire AnnData object.