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

Using RenameCells with sparse matrices #523

Closed
lazappi opened this issue Jun 5, 2018 · 2 comments
Closed

Using RenameCells with sparse matrices #523

lazappi opened this issue Jun 5, 2018 · 2 comments

Comments

@lazappi
Copy link
Contributor

lazappi commented Jun 5, 2018

Opening this as an issue after @nbahlis commented on #510

Hello,
when using RenameCells I get the error "invalid dimnames given for "dgCMatrix" object "
Does RenameCells work with sparse matrices?

thanks

@lazappi
Copy link
Contributor Author

lazappi commented Jun 5, 2018

Hi @nbahlis

Are you able to provide a reproducible example that causes the error?

I tried the following code using a sparse matrix and didn't have any problems.

library(Seurat)
data("pbmc_small")
sparse_data <- as(pbmc_small@raw.data, "dgCMatrix")
pbmc_sparse <- CreateSeuratObject(sparse_data)
RenameCells(pbmc_sparse, add.cell.id = "TEST")

The Seurat developers might have more of an idea what the problem could be here.

@nbahlis
Copy link

nbahlis commented Jun 5, 2018

thank you Luke,
Mia Culpa. There was an error in my matrix. Code is fine

andrewwbutler added a commit that referenced this issue Feb 15, 2021
Add spatial section in website docs, add concept tags
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

3 participants