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: as(<matrix>, "dgeMatrix") is deprecated since Matrix 1.5-0; #14

Open
luohaohao opened this issue Oct 1, 2022 · 8 comments
Open

Comments

@luohaohao
Copy link

scRNA_harmony <- sc.metabolism.Seurat(obj = countexp.Seurat, method = "VISION", imputation = F, ncores = 2, metabolism.type = "KEGG")
Error: as(, "dgeMatrix") is deprecated since Matrix 1.5-0; do as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") instead
In addition: Warning message:
In readSignaturesInput(signatures) : NAs introduced by coercion

use demo file, an error is reported after execution.
thanks

@XuenaXie
Copy link

How did you solve it in the end? I also encountered this problem. thanks!

Evaluating signature scores on cells...

Error: as(, "dgeMatrix") is deprecated since Matrix 1.5-0; do as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") instead

@KevinZhou-hub
Copy link

I got the same error, for everyone who encounters this problem afterward, the solution is pretty straightforward, just downgrade Matrix to 1.4.1 by:

install.packages("https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.4-1.tar.gz", repos=NULL, type="source")

However, my Seurat version is 4.1.1 and requires Matrix >= 1.5.0, so the package needs to be upgraded after I run scMetabolism... I suppose it's possible to download the source code and change as(, "dgeMatrix") to as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") manually. Hope the developers can make modifications in the future version.

@Chanlder66
Copy link

install.packages("Matrix"),do not install version before 1.5

@paolabc
Copy link

paolabc commented Oct 25, 2023

Hi there!

I am have the same issue. I would like to know if change as(, "dgeMatrix") to as(as(as(., "dMatrix") in the source code worked. I also would like to double check if it is should be changed on the matrix source code. I did not find it on scMetabolism package.

Thanks,
Paola

@Noralii
Copy link

Noralii commented Jun 11, 2024

I meet the same problem Error: (converted from warning) 'as(, "dgeMatrix")' is deprecated.
Use 'as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix")' instead.

@GUOYF0412
Copy link

so,how to solve this problem?

@clearc352
Copy link

Hello,i think that is problem from VISION package.
In VISION(3.0.2)NormalizationMethods script :https://github.com/YosefLab/VISION/blob/master/R/NormalizationMethods.R
line 170 change to: data <- as(as(as(data, "dMatrix"), "generalMatrix"), "unpackedMatrix")

@watermelon1234567
Copy link

I tried that. It didn't work.

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

9 participants