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

function 'as_cholmod_sparse' not provided by package 'Matrix' due to Matrix version #7

Closed
acihanckr opened this issue Dec 12, 2023 · 2 comments

Comments

@acihanckr
Copy link

Very nice package, thanks for the work. When I ran createSCEobject function with your example data (the following code), I ran into the following error. When I looked for similar issues I figured out it is due to Matrix package version. So downgrading Matrix to 1.6-1 will fix the problem but in that case Seurat will not load since SeuratObject requires Matrix>=1.6-3.

library(scX)
cseo <- createSCEobject(xx = scXample, 
                        partitionVars = "inferred_cell_type", 
                        metadataVars = c("source_name", "age", "sex", "strain", "treatment", "pseudotime"),
                        descriptionText = "Quick Start Guide")

launch_scX(cseo)


Creating SCE object... Finished
Changing factors from partitionVars... Finished
Computing QC metrics... Finished
Computing normalization...Error in (function (A, nv = 5, nu = nv, maxit = 1000, work = nv + 7, reorth = TRUE,  : 
  function 'as_cholmod_sparse' not provided by package 'Matrix'
@mluzvercesi
Copy link
Collaborator

Hey, thanks for reporting this!

That is indeed an issue with the latest version of Matrix, relative to irlba which calls that function. As reported in bwlewis/irlba#70, re-installing that package after having the latest Matrix version fixes that:

remove.packages("irlba")
install.packages("irlba")

Hope this works!

@Zhanghan1024
Copy link

cds = preprocess_cds(cds, num_dim = 100)
Error in (function (A, nv = 5, nu = nv, maxit = 1000, work = nv + 7, reorth = TRUE, :
function 'as_cholmod_sparse' not provided by package 'Matrix'
remove.packages("irlba")
install.packages("irlba")
and restart, it is 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

3 participants