chuiqin / irGSEA

The integration of single cell rank-based gene set enrichment analysis
Other
112 stars 18 forks source link

Error in irGSEA.integrate(object = pbmc3k.final, group.by = "seurat_annotations", : Please imput correct `method`. #51

Open RGT183 opened 1 day ago

RGT183 commented 1 day ago

library(irGSEA) library(Seurat) Loading required package: SeuratObject Loading required package: sp ‘SeuratObject’ was built under R 4.3.0 but the current version is 4.4.0; it is recomended that you reinstall ‘SeuratObject’ as the ABI for R may have changed ‘SeuratObject’ was built with package ‘Matrix’ 1.6.4 but the current version is 1.7.0; it is recomended that you reinstall ‘SeuratObject’ as the ABI for ‘Matrix’ may have changed

Attaching package: ‘SeuratObject’

The following objects are masked from ‘package:base’:

%||%, intersect, t

Attaching package: ‘Seurat’

The following object is masked from ‘package:base’:

%||%

library(SeuratData) ── Installed datasets ───────────────────────────────────────── SeuratData v0.2.2 ── ✔ pbmc3k 3.1.4

──────────────────────────────────────── Key ─────────────────────────────────────── ✔ Dataset loaded successfully ❯ Dataset built with a newer version of Seurat than installed ❓ Unknown version of Seurat installed

download 3k PBMCs from 10X Genomics

InstallData("pbmc3k") Warning: The following packages are already installed and will not be reinstalled: pbmc3k data("pbmc3k.final") pbmc3k.final <- SeuratObject::UpdateSeuratObject(pbmc3k.final) Validating object structure Updating object slots Ensuring keys are in the proper structure Updating matrix keys for DimReduc ‘pca’ Updating matrix keys for DimReduc ‘umap’ Warning: Assay RNA changing from Assay to Assay Warning: Graph RNA_nn changing from Graph to Graph Warning: Graph RNA_snn changing from Graph to Graph Warning: DimReduc pca changing from DimReduc to DimReduc Warning: DimReduc umap changing from DimReduc to DimReduc Ensuring keys are in the proper structure Ensuring feature names don't have underscores or pipes Updating slots in RNA Updating slots in RNA_nn Setting default assay of RNA_nn to RNA Updating slots in RNA_snn Setting default assay of RNA_snn to RNA Updating slots in pca Updating slots in umap Setting umap DimReduc to global Setting assay used for NormalizeData.RNA to RNA Setting assay used for FindVariableFeatures.RNA to RNA Setting assay used for ScaleData.RNA to RNA Setting assay used for RunPCA.RNA to RNA Setting assay used for JackStraw.RNA.pca to RNA No assay information could be found for ScoreJackStraw Setting assay used for FindNeighbors.RNA.pca to RNA No assay information could be found for FindClusters Setting assay used for RunUMAP.RNA.pca to RNA Validating object structure for Assay ‘RNA’ Validating object structure for Graph ‘RNA_nn’ Validating object structure for Graph ‘RNA_snn’ Validating object structure for DimReduc ‘pca’ Validating object structure for DimReduc ‘umap’ Object representation is consistent with the most current Seurat version Warning messages: 1: Adding a command log without an assay associated with it 2: Adding a command log without an assay associated with it

Seurat object

pbmc3k.final <- irGSEA.score(object = pbmc3k.final, assay = "RNA",

chuiqin commented 1 day ago

查看你的irGSEA.score函数运行信息后发现,你的AUCell打分失败了,可能是AUCell版本不对或者AUCell包没有装好。 因此,在运行irGSEA.integrate函数时,应该将AUCell去掉。例如:

result.dge <- irGSEA.integrate(object = pbmc3k.final,
                           group.by = "seurat_annotations", metadata = NULL, col.name = NULL,
                           method = c("UCell","singscore","ssgsea"))
RGT183 commented 1 day ago

1731513367421

20f21bac6cf7c83c88ab87304dba65d 去掉 AUCell 还是会报错

chuiqin commented 1 day ago

1731513367421

20f21bac6cf7c83c88ab87304dba65d 去掉 AUCell 还是会报错

irGSEA.integrate函数的的运行信息来看,UCell、singscore和ssgsea的差异基因集计算并没有成功,因此,综合评估那一步就出错了。正确的运行信息应该如下:

> result.dge <- irGSEA.integrate(object = pbmc3k.final,
+                                group.by = "seurat_annotations", metadata = NULL, col.name = NULL,
+                                method = c("AUCell","UCell","singscore","ssgsea"))
Calculate differential gene set : AUCell
Finish!
Calculate differential gene set : UCell
Finish!
Calculate differential gene set : singscore
Finish!
Calculate differential gene set : ssgsea
Finish!

我猜大概率是版本问题,你的irGSEA和Seurat版本是多少?