标签:err remove ati null 测试 rgba 新版本 super ali
> scRNA <- FindNeighbors(scRNA, dims = pc.num)
Computing nearest neighbor graph
Computing SNN
Error in validObject(.Object) :
invalid class “Graph” object: superclass "Mnumeric" not defined in the environment of the object‘s class
Seurat执行FindNeighbor出现
invalid class “Graph” object: superclass "Mnumeric" not defined in the environment of the object‘s class
原因是 Matrix package (1.3-3) 新版本不兼容,解决方法就是降级到1.3-2
首先,我们需要卸载当前的Matrix
remove.packages("Matrix")
然后从存档里安装旧版本的Matrix
packageurl <- "https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.3-2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
国内用户可以用情况镜像源 (文件也就是1.9Mb, 应该不需要用到国内镜像进行加速)
packageurl <- "https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/Archive/Matrix/Matrix_1.3-2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
然后测试下, 发现问题已经解决了。
library(Seurat)
pbmc_small <- FindNeighbors(pbmc_small, reduction = "pca", dims = 1:10)
参考资料
https://github.com/satijalab/seurat/issues/4436
invalid class “Graph” object: superclass "Mnumeric" not defined
标签:err remove ati null 测试 rgba 新版本 super ali
原文地址:https://www.cnblogs.com/emanlee/p/14924558.html