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

Solution for as_cholmod_sparse and CRsparse_rowSums errors #8202

Open
dcollins15 opened this issue Dec 18, 2023 · 5 comments
Open

Solution for as_cholmod_sparse and CRsparse_rowSums errors #8202

dcollins15 opened this issue Dec 18, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@dcollins15
Copy link
Contributor

dcollins15 commented Dec 18, 2023

After a recent update to the Matrix package, users have encountered issues running Seurat functions that depend on certain Matrix generics. Typically, this results in one of two errors:

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

OR

Error in .local(x, na.rm, dims, ...) :
  object 'CRsparse_colSums' not found

Solution

To resolve the first error, re-install the irlba package from source:

install.packages("irlba", type="source", force = TRUE)

To resolve the second error, re-install the TFBSTools package from source:

BiocManager::install("TFBSTools", type = "source", force = TRUE)

Details

The errors are encountered if either irlba or TFBSTools was installed with Matrix <=1.6-1 and then run with Matrix >=1.6-2. When a package is installed, the definitions for all its S4 classes/methods are cached, including methods from its dependencies (unless they're explicitly included in the package's NAMESPACE using an importClassesFrom directive). In this case, S4 references from Matrix <= 1.6-1 that were cached by irlba and TFBSTools and then dropped in Matrix >= 1.6-2, cannot be properly resolved. For a more detailed discussion on S4 caching and the Matrix package, please checkout this thread.

Re-installing the affected packages from source resolves the issue by refreshing their S4 method caches.

@dcollins15 dcollins15 added the bug Something isn't working label Dec 18, 2023
@dcollins15 dcollins15 pinned this issue Dec 18, 2023
@dcollins15 dcollins15 changed the title Error: object 'CRsparse_colSums' not found raised after upgrading to Seurat v5.0.1 Solution: object 'CRsparse_colSums' not found raised after upgrading to Seurat v5.0.1 Dec 21, 2023
@sjm0240111
Copy link

Thanks! @dcollins15 . This works for me!

@Dragonmasterx87
Copy link

Dragonmasterx87 commented Jan 24, 2024

This solution worked for me allowing Pando to be compatible with my current seurat/signac environments. Thanks @dcollins15 !

@Cimorgh-IT
Copy link

Thanks, it worked for me.

@GerardoZA
Copy link

Thank you!
This also worked for me.

@emidalla
Copy link

Thanks @dcollins15 , that worked for me as well!

@dcollins15 dcollins15 changed the title Solution: object 'CRsparse_colSums' not found raised after upgrading to Seurat v5.0.1 Solution for as_cholmod_sparse and CRsparse_rowSums errors Feb 3, 2025
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

6 participants