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

AttributeError after "scv.pp.moments" command #1269

Closed
panapapa14 opened this issue Sep 19, 2024 · 1 comment
Closed

AttributeError after "scv.pp.moments" command #1269

panapapa14 opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working duplicate Duplicated issue

Comments

@panapapa14
Copy link

Hi there. I have been trying to run scvelo for two weeks now, figuring out workarounds for several issues like memory ones and so on.
Having downsampled my dataset, reduced certain parameters, kept genes of certain expression levels and done PCA, I was hopinng to find a way to make it work, but nope.
Now I am dealing with the following error:

scv.pp.moments(adata_filtered_spliced, n_pcs=20, n_neighbors=5)
Traceback (most recent call last):
File "", line 1, in
File "/home/splab/miniconda3/lib/python3.12/site-packages/scvelo/preprocessing/moments.py", line 63, in moments
neighbors(
File "/home/splab/miniconda3/lib/python3.12/site-packages/scvelo/preprocessing/neighbors.py", line 223, in neighbors
n_duplicate_cells = len(get_duplicate_cells(adata))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/splab/miniconda3/lib/python3.12/site-packages/scvelo/preprocessing/neighbors.py", line 555, in get_duplicate_cells
X_new = np.array(X[idx_dup].A if issparse(X) else X[idx_dup])
^^^^^^^^^^^^
AttributeError: 'csr_matrix' object has no attribute 'A'
...
Everything is updated and I even tried (multiple times) to proceed to manual changes of the involved .py files (according to the error).

Any help would be extremely valuable! Thank you for your time.

# paste your code here, if applicable
Error output
# paste the error output here, if applicable
Versions
# paste the ouput of scv.logging.print_versions() here
@panapapa14 panapapa14 added the bug Something isn't working label Sep 19, 2024
@WeilerP
Copy link
Member

WeilerP commented Sep 24, 2024

Duplicate of #1260; see #1263.

@WeilerP WeilerP closed this as completed Sep 24, 2024
@WeilerP WeilerP added the duplicate Duplicated issue label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate Duplicated issue
Projects
None yet
Development

No branches or pull requests

2 participants