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

Error in Read10x with R Matrix package v. 1.5-0 #6438

Closed
ms-gx opened this issue Sep 19, 2022 · 1 comment
Closed

Error in Read10x with R Matrix package v. 1.5-0 #6438

ms-gx opened this issue Sep 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@ms-gx
Copy link

ms-gx commented Sep 19, 2022

When using function Read10x I got the following error:
Error: as(<dgTMatrix>, "dgCMatrix") is deprecated since Matrix 1.5-0; do as(., "CsparseMatrix") instead

In function Read10x I changed
list_of_data[[j]] <- as(object = list_of_data[[j]], Class = "dgCMatrix")
to
list_of_data[[j]] <- as(object = list_of_data[[j]], Class = "CsparseMatrix")

Now it works, but I guess this has to be adjusted globally.

See here:
ms-gx@63185aa

@ms-gx ms-gx added the bug Something isn't working label Sep 19, 2022
@AustinHartman
Copy link
Contributor

Thanks for raising this - Seurat 4.2.0 was just released on CRAN which addresses coercions which were deprecated in Matrix 1.5.0. Alternatively, you can try modifying the Matrix.warnDeprecatedCoerce option in order to toggle warnings/errors as described here under 1.5.0

laurenhsu1 added a commit to laurenhsu1/CellChat that referenced this issue May 22, 2024
I got an error when trying to feed the createCellChat function a SingleCellExperiment containing dgRMatrix format in logcounts. The error occurs in trying to coerce a dgRMatrix to dgCMatrix, but it works to coerce to "CsparseMatrix", which ultimately results in a dgCMatrix. 

Supposedly this issue has been resolved in zellkonverter a couple years ago, (theislab/zellkonverter#55), but I just ran into this today with data imported with zellkonverter which was a dgRMatrix, and my packages are up to date. I then found a couple other issues with discussion of this particular conversion problem, so I would suggest making this small update so that it will seamlessly work with dgRMatrix input too! 
theislab/zellkonverter#34
satijalab/seurat#6438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants