Open BoatCC123 opened 6 months ago
首先,检查一下是否有celltype
这一列存在,以及随机挑选一个Assay验证一下是否存在,可以这样操作:
unique(Neutrophi_rename.final2$celltype)
Neutrophi_rename.final2[["AUCell"]]@scale.data[1:2,1:2]
如果存在,随机挑一个Assay检查一下这些基因集是否真的在这些细胞类型中存在差异;
Idents(Neutrophi_rename.final2) <- Neutrophi_rename.final2$celltype
a <- Seurat::FindAllMarkers(object = Neutrophi_rename.final2, assay = "AUCell",
slot = "scale.data",
test.use = "wilcox", min.pct = -Inf, logfc.threshold = 0,
min.cells.group = 0, min.diff.pct = -Inf, verbose = F,
min.cells.feature = 0)
以上方法都失败的话,我们要先用示例数据测试一下irGSEA流程是否顺畅。 如果示例数据跑irGSEA流程不顺畅,说明安装存在问题:
# load PBMC dataset by R package SeuratData
library(Seurat)
library(SeuratData)
# download 3k PBMCs from 10X Genomics
InstallData("pbmc3k")
data("pbmc3k.final")
pbmc3k.final <- SeuratObject::UpdateSeuratObject(pbmc3k.final)
# Seurat object
pbmc3k.final <- irGSEA.score(object = pbmc3k.final, assay = "RNA",
slot = "data", msigdb = T, species = "Homo sapiens",
category = "H", geneid = "symbol",
method = c("AUCell", "UCell", "singscore", "ssgsea"), kcdf = 'Gaussian')
# Integrated analysis
result.dge <- irGSEA.integrate(object = pbmc3k.final,
group.by = "seurat_annotations", metadata = NULL, col.name = NULL,
method = c("AUCell","UCell","singscore","ssgsea"))
好的,非常感谢您,我会尽快尝试。有问题再跟您交流,辛苦了! ------------------ Original ------------------ From: @.>; Date: Sat, Mar 2, 2024 11:50 PM To: @.>; Cc: @.>; @.>; Subject: Re: [chuiqin/irGSEA] irGSEA.integrate (Issue #33)
首先,检查一下是否有celltype这一列存在,以及随机挑选一个Assay验证一下是否存在,可以这样操作:
unique(Neutrophi_rename.final2$celltype) @.***[1:2,1:2]
如果存在,随机挑一个Assay检查一下这些基因集是否真的在这些细胞类型中存在差异;
Idents(Neutrophi_rename.final2) <- Neutrophi_rename.final2$celltype a <- Seurat::FindAllMarkers(object = Neutrophi_rename.final2, assay = "AUCell", slot = "scale.data", test.use = "wilcox", min.pct = -Inf, logfc.threshold = 0, min.cells.group = 0, min.diff.pct = -Inf, verbose = F, min.cells.feature = 0)
以上方法都失败的话,我们要先用示例数据测试一下irGSEA流程是否顺畅。
如果示例数据跑irGSEA流程不顺畅,说明安装存在问题:
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
还可以排除一下Seurat的版本。错误的发生是因为Seurat从5.02开始,增加了一个fc.slot参数。如果你要计算scale.data
的差异,不管是FindAllMarkers
还是FindMarkers
函数,没有指定fc.slot
,计算的时候都会出错。恰好irGSEA的打分矩阵都存放在scale.data里面。我在新版本的irGSEA(version 3.2.4)里面已经修复了这个错误,只要重新安装irGSEA即可解决这个问题。
用的seurat.V5对象,进行时出现报错,请问该如何解决呢?麻烦了