signac
signac copied to clipboard
Solution for errors related to `as_cholmod_sparse ` or `CRsparse_rowSums`
Following a recent update to the Matrix package, several users have reported errors related to functions that use methods from the Matrix package. These will typically result in error messages like: 'as_cholmod_sparse' not provided by package 'Matrix'
or object 'CRsparse_colSums' not found
.
Here is a list of relevant issues:
https://github.com/stuart-lab/signac/issues/1559 https://github.com/stuart-lab/signac/issues/1591 https://github.com/stuart-lab/signac/issues/1528 https://github.com/stuart-lab/signac/issues/1530 https://github.com/stuart-lab/signac/issues/1532 https://github.com/stuart-lab/signac/issues/1547
Cause
This is caused by a new version of Matrix removing certain S4 classes. Packages that used certain S4 methods from Matrix (such as irlba, TFBSTools, and Seurat) subsequently encounter errors. This is because the S4 methods are cached when the R package is built, rather than loaded in the R session. The solution is to re-build the impacted packages from source with the updated Matrix package installed. More information can be found here
Solutions
'as_cholmod_sparse' not provided by package 'Matrix'
To resolve this issue re-install the irlba
package from source:
install.packages("irlba", type="source")
object 'CRsparse_colSums' not found
To resolve this issue re-install the TFBSTools package as described in this Seurat issue: https://github.com/satijalab/seurat/issues/8202
BiocManager::install("TFBSTools", type = "source", force = TRUE)