Error in running FindNeighbors - Error in validityMethod(as(object, superClass)) : Objekt 'Csparse_validate' not found

538 Views Asked by At

I am using the Seurat vignette in R to analyse transcriptomic data

I suddenly cannot run my so far well-working script due to this error:

Error in validityMethod(as(object, superClass)) : Object 'Csparse_validate' not found

Re-installing and/or updating many packages such as Seurat, Matrix, ... did not work, I also tried various versions of Matrix and also different datasets (that have worked beforehand) without any success

Is there anything else to solve this problem? Thanks in advance!

2

There are 2 best solutions below

2
MickR On

Removing ALL packages, then re-installing packages including Seurat and a BINARY version of Matrix (v 1.5-4.1) worked for me.

I don't know if it was THE cause, but in previous attempts in which I re-installed Matrix v1.6-1 (source version needing compilation) I kept getting this error every time I tried to run Seurat::FindNeighbors(object,dims=1:30). Another factor may be that you need to recreate the Seurat object (so don't load an existing Seurat object created with an older version of Seurat); not sure if this is actually causally involved, but this was among the things I did just before I got rid if this error.

0
user19907940 On

It's because of the Matrix version used in Seurat vs. installed. You can define Csparse_validate and rerun. The following line before FindNeighbors helps:

Csparse_validate = "CsparseMatrix_validate"