Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RunUMAP code error after merged spatial transcriptomic objects

Tags:

pca

seurat

I merged 6 spatial transcriptomic objects together and then ran

Metastaticsamples.merge <- ScaleData(Metastaticsamples.merge)

#perform linear reduction analysis:
Metastaticsamples.merge <- RunPCA(Metastaticsamples.merge, features = VariableFeatures(object = Metastaticsamples.merge))

#Metastatic
Metastaticsamples.merge <- FindNeighbors(Metastaticsamples.merge, reduction = "pca", dims = 1:15)
Metastaticsamples.merge <- FindClusters(Metastaticsamples.merge, verbose = FALSE)
Metastaticsamples.merge <- RunUMAP(Metastaticsamples.merge, dims = 1:15)

However upon doing RunUMAP i hit an error code

20:35:37 Initializing from normalized Laplacian + noise (using irlba)
Error in irlba::irlba(L, nv = n, nu = 0, maxit = iters) :
function 'as_cholmod_sparse' not provided by package 'Matrix'

any thoughts on what happened and how to overcome this?

tried to check packages update them but did not work

like image 965
Christopher Kuo Avatar asked Sep 02 '25 16:09

Christopher Kuo


2 Answers

I ran into the same error. Yes, it can be resolved by downgrading to Matrix 1.6-1. But it's also possible to reinstall irlba without the need to downgrade Matrix (which is a temporary workaround). Reinstalling irlba worked in my case.

Also see: https://github.com/bwlewis/irlba/issues/70

like image 145
mischko Avatar answered Sep 05 '25 14:09

mischko


Thanks, got same error. issue solved after:

   install.packages("remotes")
   remotes::install_version("Matrix", version = "1.6-1")
   packageVersion("Matrix")
like image 26
Reza Avatar answered Sep 05 '25 15:09

Reza