
Bixverse implementation of GSVA
calc_gsva.RdImplementation of the bixverse version of the gene set variation analysis (GSVA), see Hänzelmann, et al.
Usage
calc_gsva(
exp,
pathways,
kernel = c("gaussian", "poisson", "none"),
gaussian = deprecated(),
gsva_params = params_gsva(),
.verbose = FALSE
)Arguments
- exp
Numerical matrix. Rows represents the features, columns the features/genes.
- pathways
List. A named list with each element containing the genes for this pathway.
- kernel
String. One of
c("gaussian", "poisson", "none"). The kernel to use.- gaussian
Boolean. If set to
TRUEthe Gaussian kernel will be used, ifFALSEthe Poisson will be used.- gsva_params
List. The GSVA parameters, see
params_gsva()wrapper function. This function generates a list containing:tau - Float. The tau parameter of the algorithm. Large values will emphasise the tails more. Defaults to
1.0.min_size - Integer. Minimum size for the gene sets.
max_size - Integer. Maximum size for the gene sets.
max_diff - Boolean. Influences the scoring. If
TRUEthe difference will be used; ifFALSE, the largest absolute value.abs_rank - Boolean. If
TRUE= pos-neg,FALSE= pos+neg for the internal calculations.
- .verbose
Boolean. Controls verbosity.
Examples
# per-sample GSVA scores for two gene sets
set.seed(123L)
exp_mat <- matrix(
rnorm(200 * 10),
nrow = 200,
dimnames = list(sprintf("gene_%03i", 1:200), sprintf("sample_%i", 1:10))
)
pathways <- list(
set_a = sprintf("gene_%03i", 1:20),
set_b = sprintf("gene_%03i", 50:80)
)
dim(calc_gsva(exp_mat, pathways))
#> [1] 2 10