chuiqin / irGSEA

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

GSVA error with ssGSEA #43

Open FaehlingT opened 6 months ago

FaehlingT commented 6 months ago

After updating to R 4.4.0 and using irGSEA.score with method = "ssGSEA", I get the following error: Error: Calling gsva(expr=., gset.idx.list=., method=., ...) is defunct; use a method-specific parameter object (see '?gsva').

chuiqin commented 5 months ago

This problem occurs because the GSVA package deprecated the GSVA function in version 1.52.2 or higher. I updated irGSEA to make irGSEA (version 3.2.6) suitable for both old and new versions of GSVA. In addition, in version 3.2.6irGSEA, irGSEA.merge and irGSEA.score functions were added to facilitate us to integrate different scoring matrices in the same Seurat object. You can try it. The following is a demonstration of the new version:

> library(RcppML)
> library(irGSEA)
> data("pbmc3k.final")
> pbmc3k.final <- irGSEA.score(object = pbmc3k.final, assay = "RNA", slot = "data",ncores = 1,
+                              msigdb = T, species = "Homo sapiens", category = "H", geneid = "symbol",
+                              method = c("ssgsea","GSVA","zscore","plage"), kcdf = 'Gaussian')
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
Calculate ssgsea scores
Setting parallel calculations through a with workers=%d and tasks=100.
 back-end
Estimating ssGSEA scores for 50 gene sets.
[1] "Calculating ranks..."
[1] "Calculating absolute values from ranks..."
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Finish calculate ssgsea scores
Calculate GSVA scores
Setting parallel calculations through a MulticoreParam back-end with workers=1 and tasks=100.
Estimating GSVA scores for 50 gene sets.
Estimating ECDFs with Gaussian kernels
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Finish calculate GSVA scores
Calculate zscore scores
Setting parallel calculations through a with workers=%d and tasks=100.
 back-end
Estimating combined z-scores for 50 gene sets.
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Finish calculate zscore scores
Calculate plage scores
Setting parallel calculations through a with workers=%d and tasks=100.
 back-end
Estimating PLAGE scores for 50 gene sets.
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Finish calculate plage scores
> Assays(pbmc3k.final)
[1] "RNA"    "ssgsea" "GSVA"   "zscore" "plage" 
> packageVersion("irGSEA")
[1] ‘3.2.6’
> packageVersion("GSVA")
[1] ‘1.53.2’
FaehlingT commented 5 months ago

Thank you for your fast reply! How can I download the version 3.2.6 of irGSEA? In this repository, it says that 2.1.5 is the most current one. Thank you for your support!