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

Can't use predict_celltype for sce converted from Seurat #1

Open
veralow1990 opened this issue Feb 27, 2019 · 1 comment · May be fixed by #2
Open

Can't use predict_celltype for sce converted from Seurat #1

veralow1990 opened this issue Feb 27, 2019 · 1 comment · May be fixed by #2
Assignees
Labels
enhancement New feature or request

Comments

@veralow1990
Copy link

Hi there!
I'm interested in using celltype for data generated from 10X Genomics pipelines.
I used Seurat to read the 10X data and converted the Seurat object to SCE.
When I tried to use predict_celltype to read the resulted SCE, there came an error saying "Error in UseMethod("predict_celltype") :
no applicable method for 'predict_celltype' applied to an object of class "c('dgCMatrix', 'CsparseMatrix', 'dsparseMatrix', 'generalMatrix', 'dCsparseMatrix', 'dMatrix', 'sparseMatrix', 'compMatrix', 'Matrix', 'xMatrix', 'mMatrix', 'Mnumeric', 'replValueSp')" ".
How can I fix this problem?
Thank you so much! Looking forward to your reply.
BW

@ddiez
Copy link
Owner

ddiez commented Feb 27, 2019

Yes, I've been hit by this problem before. This is caused because Seurat stores data counts as sparse matrices and some of the functions I use do not support them. A temporary solution is to do:

assays(sce) <- lapply(assays(sce), as.matrix)

where you have to substitute sce by the name of your SingleCellExperiment object.

For a more permanent solution I will try to push some fix in the near future.

@ddiez ddiez self-assigned this Feb 27, 2019
@ddiez ddiez added the enhancement New feature or request label Feb 27, 2019
@zeehio zeehio linked a pull request May 24, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants