运行SCTransform出现Error
Data <- SCTransform(Data,vars.to.regress=c("percent.mt","percent.rb","S.Score","G2M.Score"))
error in evaluating the argument 'x' in selecting a method for function 't': missing value where TRUE/FALSE needed
原因:
This is happens when poisson regression fails due to poor initialization (affected methods are poisson, qpoisson, nb_fast).
泊松回归由于初始化不好而失败。
该问题已在开发分支中修复。
解决方案:
#安装开发分支版本
remotes::install_github("ChristophH/sctransform@develop")
# 安装 "glmGamPoi"包
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("glmGamPoi")
#重新加载即可运行成功
Data <- SCTransform(Data,method="glmGamPoi",vars.to.regress = c("percent.mt","percent.rb","S.Score","G2M.Score"))
Github参考地址
①issues/3740
②issues/4296
③sctransform#known-issues