gsva(expr, gset.idx.list, ...)## S3 method for class 'ExpressionSet,list':
gsva(expr, gset.idx.list, annotation,
method = c("gsva", "ssgsea", "zscore", "plage"), rnaseq = FALSE,
abs.ranking = FALSE, min.sz = 1, max.sz = Inf, no.bootstraps = 0,
bootstrap.percent = 0.632, parallel.sz = 0, parallel.type = "SOCK",
mx.diff = TRUE, tau = switch(method, gsva = 1, ssgsea = 0.25, NA),
kernel = TRUE, ssgsea.norm = TRUE, verbose = TRUE,
is.gset.list.up.down = FALSE)
## S3 method for class 'ExpressionSet,GeneSetCollection':
gsva(expr, gset.idx.list,
annotation, method = c("gsva", "ssgsea", "zscore", "plage"),
rnaseq = FALSE, abs.ranking = FALSE, min.sz = 1, max.sz = Inf,
no.bootstraps = 0, bootstrap.percent = 0.632, parallel.sz = 0,
parallel.type = "SOCK", mx.diff = TRUE, tau = switch(method, gsva = 1,
ssgsea = 0.25, NA), kernel = TRUE, ssgsea.norm = TRUE, verbose = TRUE,
is.gset.list.up.down = FALSE)
## S3 method for class 'matrix,GeneSetCollection':
gsva(expr, gset.idx.list, annotation,
method = c("gsva", "ssgsea", "zscore", "plage"), rnaseq = FALSE,
abs.ranking = FALSE, min.sz = 1, max.sz = Inf, no.bootstraps = 0,
bootstrap.percent = 0.632, parallel.sz = 0, parallel.type = "SOCK",
mx.diff = TRUE, tau = switch(method, gsva = 1, ssgsea = 0.25, NA),
kernel = TRUE, ssgsea.norm = TRUE, verbose = TRUE,
is.gset.list.up.down = FALSE)
## S3 method for class 'matrix,list':
gsva(expr, gset.idx.list, annotation,
method = c("gsva", "ssgsea", "zscore", "plage"), rnaseq = FALSE,
abs.ranking = FALSE, min.sz = 1, max.sz = Inf, no.bootstraps = 0,
bootstrap.percent = 0.632, parallel.sz = 0, parallel.type = "SOCK",
mx.diff = TRUE, tau = switch(method, gsva = 1, ssgsea = 0.25, NA),
kernel = TRUE, ssgsea.norm = TRUE, verbose = TRUE,
is.gset.list.up.down = FALSE)
ExpressionSet
object or as a matrix of expression values where rows correspond
to genes and columns correspond to samples.list
object or as a
GeneSetCollection
object.gsva()
with expression data in a matrix
and gene sets as a GeneSetCollection
object, the annotation
argument
can be used to supply the name of the Bioconductor package that contains
annotations for the class of gene identifiers occurring in the row names of
the expression data matrix. By default gsva()
will try to match the
identifiers in expr
to the identifiers in gset.idx.list
just as
they are, unless the annotation
argument is set.gsva
(Hanzelmann et al, 2013) and other options are
ssgsea
(Barbie et al, 2009), zscore
(Lee et al, 2008) or plage
(Tomfohr et al, 2005). The latter two standardize first expression profiles into z-scores
over the samples and, in the case of zscore
, it combines them together as their sum
divided by the square-root of the size of the gene set,
while in the case of plage
they are used to calculate the singular value decomposition
(SVD) over the genes in the gene set and use the coefficients of the first right-singular vector
as pathway activity profile.rnaseq=FALSE
, default) or RNA-Seq (rnaseq=TRUE
) experiments.abs.ranking=FALSE
) or by absolute value (abs.ranking=TRUE
).
In the latter, pathways with genes enriched on either extreme
(high or low) will be regarded as 'highly' activated.parallel
or the
snow
library. If parallel
is loaded and this argument
is left with its default value (parallel.sz=0
) then it will use
all available core processors unless we set this argument with a
smaller number. If snow
is loaded then we must set this argument
to a positive integer number that specifies the number of processors to
employ in the parallel calculation.snow
.mx.diff=FALSE
: ES is calculated as
the maximum distance of the random walk from 0. mx.diff=TRUE
(default): ES
is calculated as the magnitude difference between the largest positive
and negative random walk deviations.gsva
(Hanzelmann et al., 2013) and the ssgsea
(Barbie et al., 2009) methods. By default,
this tau=1
when method="gsva"
and tau=0.25
when method="ssgsea"
just
as specified by Barbie et al. (2009) where this parameter is called alpha
.TRUE
when the GSVA method employes a kernel non-parametric
estimation of the empirical cumulative distribution function (default) and FALSE
when this function is directly estimated from the observed data. This last option is
justified in the limit of the size of the sample by the so-called Glivenko-Cantelli theorem.TRUE
(default) with method="ssgsea"
runs the SSGSEA method
from Barbie et al. (2009) normalizing the scores by the absolute difference between
the minimum and the maximum, as described in their paper. When ssgsea.norm=FALSE
this last normalization step is skipped.FALSE
.expr = ExpressionSet,gset.idx.list = list
: Method for ExpressionSet and listexpr = ExpressionSet,gset.idx.list = GeneSetCollection
: Method for ExpressionSet and GeneSetCollectionexpr = matrix,gset.idx.list = GeneSetCollection
: Method for matrix and GeneSetCollectionexpr = matrix,gset.idx.list = list
: Method for matrix and listdata("Maupin")
names(maupin)
geneSet<- maupin$sig$EntrezID #Symbol ##EntrezID # both up and down genes:
up_sig<- maupin$sig[maupin$sig$upDown == "up",]
d_sig<- maupin$sig[maupin$sig$upDown == "down",]
u_geneSet<- up_sig$EntrezID #Symbol # up_sig$Symbol ## EntrezID
d_geneSet<- d_sig$EntrezID
es.dif <- gsva(maupin$data, list(up = u_geneSet, down= d_geneSet), mx.diff=1,
verbose=TRUE, abs.ranking=FALSE, is.gset.list.up.down=TRUE, parallel.sz = 1 )$es.obs
Run the code above in your browser using DataLab