代码语言:javascript复制
library(celldex)
library(SingleR)
library(BiocParallel)
ref<- HumanPrimaryCellAtlasData()
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE'
If offline, please also see BiocManager vignette section on offline use
Error in .updateHubDB(hub_bfc, .class, url, proxy, localHub) :
Invalid Cache: sqlite file
Hub has not been added to cache
Run again with 'localHub=FALSE'
In addition: Warning message:
HumanPrimaryCellAtlasData不再有用。
请用'celldex::HumanPrimaryCellAtlasData'。
见help("Deprecated")
解决办法:
下载注释数据库(我的保存至F:sxjns hdanxibaosingleR zhushiku),复制一份到当前工作目录,加载即可使用
代码语言:javascript复制library(celldex)
library(SingleR)
library(BiocParallel)
refdata <- get(load("HumanPrimaryCellAtlas_hpca.se_human.RData"))
scRNA = pbmc
pred.scRNA <- SingleR(test = scRNA@assays$RNA$data,
ref = refdata,
labels = refdata$label.main,
clusters = scRNA@active.ident)