Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.报错解决笔记

meta <- ov_cancer@meta.data  
> meta_summ <- meta %>% 
+   group_by(sample) %>% 
+   summarise(counts = n()) %>% 
+   filter(counts > 250)
> ov_cancer <- subset(ov_cancer, subset = sample %in% meta_summ$sample) #过滤取子集
> table(ov_cancer@meta.data$sample)

   BT1303    BT1307 scrSOL001 scrSOL003 scrSOL004 
     2130      2338      1906      1803      4005 
> ov_t <- ov_cancer # 过滤后的ov_cancer赋值给ov_t
> ov_t[["RNA"]] <- split(ov_t[["RNA"]], f = ov_t$sample) 
Warning: Assay RNA changing from Assay to Assay5
Warning message:
Input is a v3 assay and `split()` only works for v5 assays; converting to a v5 assay 
> ov_t <- SCTransform(ov_t) #归一化,用了之后不需要进行NormalizeData() ScaleData() FindVariableFeatures()
Running SCTransform on assay: RNA
Running SCTransform on layer: counts.BT1303
vst.flavor='v2' set. Using model with fixed slope and excluding poisson genes.
Variance stabilizing transformation of count matrix of size 15520 by 2130
Model formula is y ~ log_umi
Get Negative Binomial regression parameters per gene
Using 2000 genes, 2130 cells
Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.

查看一下我目前matrixStats的版本

package.version('matrixStats')
[1] "1.2.0"

GitHub上搜索了一下解决办法:

错误:useNames = NA 已失效。相反,请指定 useNames = TRUE 或 useNames = FALSE。·期号 #256 ·LTLA/单人 ·GitHub上

Error in SCTransform (useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE) Related to Closed Issue #7501 · Issue #8183 · satijalab/seurat · GitHub

总结一下:

remotes::install_version("matrixStats", version="1.1.0",lib="/home/zyt/R/x86_64-pc-linux-gnu-library/4.2') 
BiocManager::install(version = "3.18") #我的R版本是4.2,BiocManager3.18版本支持R4.3以上版本所以我选择了第一个方法,重新安装matrixStats 版本1.1

参考了CSDN另一个博主的文章:https://blog.csdn.net/weixin_46128755/article/details/136395843

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值