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

Matrix issue #1591

Closed
kayarimagenomics opened this issue Jan 16, 2024 · 5 comments
Closed

Matrix issue #1591

kayarimagenomics opened this issue Jan 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@kayarimagenomics
Copy link

I am having an issue with the RunSVD() function
zhang <- RunSVD(zhang)

Running SVD
Error in irlba(A = t(x = object), nv = n, work = irlba.work, tol = tol) : 
  function 'as_cholmod_sparse' not provided by package 'Matrix'

When I had this issue in seurat it is because the Matrix package needs to be the version 1.6-1
When I then change matrix to 1.6.1

remotes::install_version("Matrix", version = "1.6-1")
packageVersion("Matrix")
library(Matrix)
library(Signac) 

> Error: package or namespace load failed for 'Signac' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
>  namespace 'Matrix' 1.6-1 is already loaded, but >= 1.6.3 is required
@kayarimagenomics kayarimagenomics added the bug Something isn't working label Jan 16, 2024
@timoast
Copy link
Collaborator

timoast commented Jan 17, 2024

You don't need to downgrade the Matrix version, it should be fixed by reinstalling some packages that depend on Matrix. The key point is that you need to reinstall from source, not using the package binaries.

You can try:

install.packages("Matrix")  # to update Matrix
install.packages(c("SeuratObject", "irlba"), type = "source")

Restart your R session after installing the packages.

See also #1559 and satijalab/seurat#8100

@realmungmung
Copy link

I tried this method and still got the same error :..(
Error in irlba(A = t(x = object), nv = n, work = irlba.work, tol = tol) :
function 'as_cholmod_sparse' not provided by package 'Matrix'

@jpcartailler
Copy link

Same RunVSD issue, added some details on this other thread since that's where I first found ideas around how to fix the issue, albeit it isn't fixed on my end yet.
satijalab/seurat#8100 (comment)

@timoast
Copy link
Collaborator

timoast commented Jan 22, 2024

@jpcartailler from your other post:

Seurat 4.3.0
SeuratObject 5.0.1

you have incompatible versions of Seurat and SeuratObject installed. You would need to update Seurat to v5

@timoast
Copy link
Collaborator

timoast commented Jan 22, 2024

Main issue thread can be found here: #1596

@timoast timoast closed this as completed Jan 22, 2024
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

4 participants