chuiqin / irGSEA

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

irGSEA.integrate报错 #23

Open blanchzl opened 11 months ago

blanchzl commented 11 months ago

运行result.dge<- irGSEA.integrate(object = scRNAsub, group.by = "celltype", metadata = scRNAsub$celltype, col.name = "ident", method = c("UCell", "singscore", 'ssgsea')) 后出现Calculate differential gene set : UCell Calculate differential gene set : singscore Calculate differential gene set : ssgsea Error in UseMethod("filter") : no applicable method for 'filter' applied to an object of class "NULL"。 检查数据没有数据是空的。 使用的dplyr 是1.1.3。是不是需要降版本?

chuiqin commented 11 months ago

方便上传scRNAsub对象检查一下吗?

blanchzl commented 11 months ago

对象太大了。我track了一下流程,显示如下: traceback() 4: dplyr::filter(., p_val_adj <= 0.05) 3: dplyr::select(., c("avg_diff", "cluster", "gene", "methods")) 2: deg.geneset %>% dplyr::filter(p_val_adj <= 0.05) %>% dplyr::select(c("avg_diff", "cluster", "gene", "methods")) 1: irGSEA.integrate(object = scRNAsub, group.by = "celltype", method = c("AUCell", "UCell", "singscore")) 问题可能出现在4这个地方。同时,我跑kegg没问题,就是go的时候出现问题。 追了一下代码,可能是在dplyr::filter(., p_val_adj <= 0.05)这一步,之前生成的deg.geneset中有null。但是这应该是运行irGSEA.integrate中产生的。

lesliez1 commented 10 months ago

我遇到了同样的问题,请问你解决了吗?

1667857557 commented 10 months ago

你好,我也遇到了同样的问题,如果需要,我可以上传相关文件(23.6 G)到百度网盘链接 以下是我的文件结构

str(pbmc3k.final) Formal class 'Seurat' [package "SeuratObject"] with 13 slots ..@ assays :List of 4 .. ..$ RNA :Formal class 'Assay' [package "SeuratObject"] with 8 slots .. .. .. ..@ counts :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:718902803] 20 23 25 26 28 40 42 47 48 50 ... .. .. .. .. .. ..@ p : int [1:338565] 0 4883 10050 14246 18429 22859 26939 31074 35332 39196 ... .. .. .. .. .. ..@ Dim : int [1:2] 28045 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:28045] "ZNF470-DT" "ENSG00000230393" "ZNF367" "SULT1B1" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:718902803] 1 1 1 2 1 4 1 1 1 2 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ data :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:718902803] 20 23 25 26 28 40 42 47 48 50 ... .. .. .. .. .. ..@ p : int [1:338565] 0 4883 10050 14246 18429 22859 26939 31074 35332 39196 ... .. .. .. .. .. ..@ Dim : int [1:2] 28045 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:28045] "ZNF470-DT" "ENSG00000230393" "ZNF367" "SULT1B1" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ0173" ... .. .. .. .. .. ..@ x : num [1:718902803] 0.285 0.285 0.285 0.507 0.285 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ scale.data : num[0 , 0 ] .. .. .. ..@ key : chr "rna" .. .. .. ..@ assay.orig : NULL .. .. .. ..@ var.features : chr(0) .. .. .. ..@ meta.features:'data.frame': 28045 obs. of 12 variables: .. .. .. .. ..$ feature_types : Factor w/ 1 level "Gene Expression": 1 1 1 1 1 1 1 1 1 1 ... .. .. .. .. ..$ genome : Factor w/ 1 level "unknown": 1 1 1 1 1 1 1 1 1 1 ... .. .. .. .. ..$ highly.variable : logi [1:28045] FALSE FALSE FALSE FALSE TRUE FALSE ... .. .. .. .. ..$ mvp.mean : num [1:28045] 0.00353 0.00129 0.02516 0.02553 0.00134 ... .. .. .. .. ..$ mvp.dispersion : num [1:28045] 0.1107 -0.0428 0.3658 0.3478 0.4072 ... .. .. .. .. ..$ mvp.dispersion.scaled : num [1:28045] -0.164 -0.134 -0.224 -0.186 0.454 ... .. .. .. .. ..$ highly.variable_nbatches : num [1:28045] 0 0 3 5 6 0 2 4 0 3 ... .. .. .. .. ..$ highly.variable_intersection: logi [1:28045] FALSE FALSE FALSE FALSE FALSE FALSE ... .. .. .. .. ..$ feature_is_filtered : logi [1:28045] FALSE FALSE FALSE FALSE FALSE FALSE ... .. .. .. .. ..$ feature_name : Factor w/ 28045 levels "5_8S_rRNA_ENSG00000273730",..: 27629 613 27560 24424 25915 15153 9156 13354 18943 25408 ... .. .. .. .. ..$ feature_reference : Factor w/ 1 level "NCBITaxon:9606": 1 1 1 1 1 1 1 1 1 1 ... .. .. .. .. ..$ feature_biotype : Factor w/ 1 level "gene": 1 1 1 1 1 1 1 1 1 1 ... .. .. .. ..@ misc : list() .. ..$ UCell :Formal class 'Assay' [package "SeuratObject"] with 8 slots .. .. .. ..@ counts :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:55114444] 0 1 2 3 4 5 6 8 9 10 ... .. .. .. .. .. ..@ p : int [1:338565] 0 165 329 497 652 818 988 1158 1338 1511 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:55114444] 0.04 0.0243 0.1107 0.0582 0.051 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ data :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:55114444] 0 1 2 3 4 5 6 8 9 10 ... .. .. .. .. .. ..@ p : int [1:338565] 0 165 329 497 652 818 988 1158 1338 1511 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:55114444] 0.04 0.0243 0.1107 0.0582 0.051 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ scale.data : num [1:186, 1:338564] 0.04 0.0243 0.1107 0.0582 0.051 ... .. .. .. .. ..- attr(, "dimnames")=List of 2 .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ0173" ... .. .. .. ..@ key : chr "ucell" .. .. .. ..@ assay.orig : NULL .. .. .. ..@ var.features : logi(0) .. .. .. ..@ meta.features:'data.frame': 186 obs. of 0 variables .. .. .. ..@ misc : list() .. ..$ singscore:Formal class 'Assay' [package "SeuratObject"] with 8 slots .. .. .. ..@ counts :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:62972880] 0 1 2 3 4 5 6 7 8 9 ... .. .. .. .. .. ..@ p : int [1:338565] 0 186 372 558 744 930 1116 1302 1488 1674 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:62972880] 0.121 0.208 0.369 0.205 0.119 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ data :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:62972880] 0 1 2 3 4 5 6 7 8 9 ... .. .. .. .. .. ..@ p : int [1:338565] 0 186 372 558 744 930 1116 1302 1488 1674 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:62972880] 0.121 0.208 0.369 0.205 0.119 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ scale.data : num [1:186, 1:338564] 0.121 0.208 0.369 0.205 0.119 ... .. .. .. .. ..- attr(, "dimnames")=List of 2 .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ0173" ... .. .. .. ..@ key : chr "singscore" .. .. .. ..@ assay.orig : NULL .. .. .. ..@ var.features : logi(0) .. .. .. ..@ meta.features:'data.frame': 186 obs. of 0 variables .. .. .. ..@ misc : list() .. ..$ ssgsea :Formal class 'Assay' [package "SeuratObject"] with 8 slots .. .. .. ..@ counts :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:62972860] 0 1 2 3 4 5 6 7 8 9 ... .. .. .. .. .. ..@ p : int [1:338565] 0 186 372 558 744 930 1116 1302 1488 1674 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:62972860] 1473 4282 6264 2089 738 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ data :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. .. .. .. ..@ i : int [1:62972860] 0 1 2 3 4 5 6 7 8 9 ... .. .. .. .. .. ..@ p : int [1:338565] 0 186 372 558 744 930 1116 1302 1488 1674 ... .. .. .. .. .. ..@ Dim : int [1:2] 186 338564 .. .. .. .. .. ..@ Dimnames:List of 2 .. .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..@ x : num [1:62972860] 1473 4282 6264 2089 738 ... .. .. .. .. .. ..@ factors : list() .. .. .. ..@ scale.data : num [1:186, 1:338564] 1473 4282 6264 2089 738 ... .. .. .. .. ..- attr(, "dimnames")=List of 2 .. .. .. .. .. ..$ : chr [1:186] "KEGG-ABC-TRANSPORTERS" "KEGG-ACUTE-MYELOID-LEUKEMIA" "KEGG-ADHERENS-JUNCTION" "KEGG-ADIPOCYTOKINE-SIGNALING-PATHWAY" ... .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ0173" ... .. .. .. ..@ key : chr "ssgsea" .. .. .. ..@ assay.orig : NULL .. .. .. ..@ var.features : logi(0) .. .. .. ..@ meta.features:'data.frame': 186 obs. of 0 variables .. .. .. ..@ misc : list() ..@ meta.data :'data.frame': 338564 obs. of 10 variables: .. ..$ location : Factor w/ 18 levels "Frontal","Left frontal",..: 6 6 6 6 6 6 6 6 6 6 ... .. ..$ cell_type : Factor w/ 17 levels "mast cell","endothelial cell",..: 14 14 6 14 14 14 17 14 14 14 ... .. ..$ nCount_RNA : num [1:338564] 15211 14341 13296 13157 13051 ... .. ..$ nFeature_RNA : int [1:338564] 4883 5167 4196 4183 4430 4080 4135 4258 3864 4016 ... .. ..$ nCount_UCell : num [1:338564] 14.5 14.7 18.1 13.8 14.9 ... .. ..$ nFeature_UCell : int [1:338564] 165 164 168 155 166 170 170 180 173 174 ... .. ..$ nCount_singscore : num [1:338564] 51.3 52.2 50.2 42.4 48.2 ... .. ..$ nFeature_singscore: int [1:338564] 186 184 185 184 185 185 184 185 186 184 ... .. ..$ nCount_ssgsea : num [1:338564] 605466 584629 638527 526789 580230 ... .. ..$ nFeature_ssgsea : int [1:338564] 166 160 166 162 160 164 152 162 156 160 ... ..@ active.assay: chr "RNA" ..@ active.ident: Factor w/ 17 levels "mast cell","endothelial cell",..: 14 14 6 14 14 14 17 14 14 14 ... .. ..- attr(, "names")= chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... ..@ graphs : list() ..@ neighbors : list() ..@ reductions :List of 1 .. ..$ umap:Formal class 'DimReduc' [package "SeuratObject"] with 9 slots .. .. .. ..@ cell.embeddings : num [1:338564, 1:2] 6.07 10.42 7.08 5.8 6.46 ... .. .. .. .. ..- attr(*, "dimnames")=List of 2 .. .. .. .. .. ..$ : chr [1:338564] "PJ017_0" "PJ017_1" "PJ017_2" "PJ017_3" ... .. .. .. .. .. ..$ : chr [1:2] "UMAP_1" "UMAP2" .. .. .. ..@ feature.loadings : num[0 , 0 ] .. .. .. ..@ feature.loadings.projected: num[0 , 0 ] .. .. .. ..@ assay.used : chr "RNA" .. .. .. ..@ global : logi FALSE .. .. .. ..@ stdev : num(0) .. .. .. ..@ key : chr "UMAP" .. .. .. ..@ jackstraw :Formal class 'JackStrawData' [package "SeuratObject"] with 4 slots .. .. .. .. .. ..@ empirical.p.values : num[0 , 0 ] .. .. .. .. .. ..@ fake.reduction.scores : num[0 , 0 ] .. .. .. .. .. ..@ empirical.p.values.full: num[0 , 0 ] .. .. .. .. .. ..@ overall.p.values : num[0 , 0 ] .. .. .. ..@ misc : list() ..@ images : list() ..@ project.name: chr "local" ..@ misc :List of 5 .. ..$ schema_version : chr "3.1.0" .. ..$ title : chr "Core GBmap" .. ..$ batch_condition : chr [1(1d)] "author" .. ..$ default_embedding : chr "X_umap" .. ..$ X_approximate_distribution: chr "count" ..@ version :Classes 'package_version', 'numeric_version' hidden list of 1 .. ..$ : int [1:3] 4 1 0 ..@ commands : list() ..@ tools : list()

方便上传scRNAsub对象检查一下吗?

lesliez1 commented 10 months ago

联系了管理员,他说数据量太大的原因,你试试在integrate之前加一句代码options(future.globals.maxSize = 100000 * 1024^5)

1667857557 commented 10 months ago

联系了管理员,他说数据量太大的原因,你试试在integrate之前加一句代码options(future.globals.maxSize = 100000 * 1024^5)

多谢多谢,加了代码后就能正常出结果了