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

seurat to anndata formatting adata.X as CSC sparse resulting in inefficient handling #69

Open
dpcook opened this issue Jan 19, 2023 · 0 comments

Comments

@dpcook
Copy link

dpcook commented Jan 19, 2023

Just documenting this in case others encounter it and find it helpful. I have been using sceasy in R to convert my Seurat objects to Anndata. I had noticed I was getting slow training speeds with scVI.

Not familiar with scipy's sparse matrix formats, I was ignoring a warning message telling me about the issue, but type(adata.X) was CSC sparse, which is apparently inefficient at row splicing. After converting with adata.X = scipy.sparse.csr_matrix(adata.X), scVI training speeds increased 10-fold.

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

No branches or pull requests

1 participant