I'm working on a project that involves performing GSVA using the GSVA package in R. Specifically, I'm trying to use the single-sample Gene Set Enrichment Analysis (ssGSEA) method. However, I'm encountering persistent errors related to the new API introduced in the Bioconductor release 3.18. The function signatures and usage have changed, and I'm having trouble adapting my code to the new requirements.
The goal is to perform GSVA for Hallmark gene sets using the ssGSEA method with the updated GSVA package. The expression data is stored in an ExpressionSet object, and the gene sets are provided as a list.
Initially, I tried using the old API style, which directly passed method specific parameters to the gsva function.
gsvaOutH_Hallmark <- gsva(
expr = exprs(eset),
gset.idx.list = h,
method = "ssgsea",
ssgsea.norm = TRUE,
verbose = FALSE
)
I got the below error:
Error in gsva(expr = exprs(eset), gset.idx.list = h, method = "ssgsea", ...) :
Calling gsva(expr=., gset.idx.list=., method=., ...) is defunct; use a method-specific parameter object (see '?gsva').
Following the documentation, I attempted to use constructor functions to create a method-specific parameter object.
ssgsea_params <- ssgseaParam(expr = exprs(eset), gset.idx.list = h, ssgsea.norm = TRUE)
This resulted in the following error:
Error in ssgseaParam(expr = exprs(eset), gset.idx.list = h, ssgsea.norm = TRUE) :
unused arguments (gset.idx.list = h, ssgsea.norm = TRUE)
Based on examples, I tried to create the parameter object with minimal arguments.
ssgsea_params <- ssgseaParam(geneSets = h)
I got the another error:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'object' in selecting a method for function 'gsvaAssayNames': argument "exprData" is missing, with no default
Lastly, I tried using the constructor function without additional arguments and passing the parameter object to the gsva function.
param <- ssgseaParam()
gsvaOutH_Hallmark <- gsva(param, exprs = exprs(eset), gset.idx.list = h, ssgsea.norm = TRUE, verbose = FALSE)
This also resulted in an error saying incorrect usage.
I'm seeking help on how to properly use the GSVA package with the new API to perform ssGSEA. Specifically, I need to understand:
Any guidance or examples would be greatly appreciated!
Use correct names of the parameters in ssgseaParam
. You are using the old ones. They should be exprData
instead of expr
, geneSets
instead of gset.idx.list
, etc.
Refer to the GSVA documentation.