logScale
. Its default
value is TRUE which means that by default the provided scores (i.e. fold
changes, hazard ratios) will be log scaled. Remember to change this
parameter to FALSE if your scores are already log scaled.
The getEs
, getEsSim
, getFc
, getHr
and
getFcHr
methods can be used to acces each subobject. For more
information please visit the man pages of each method.It also computes the NES (normalized enrichment score), p values and fdr
(false discovery rate) for all variables and signatures.
For an overview of the output use the summary
method.
In case of providing gene sets which have more than 10 distinct lengths an approximation of the calculation of the enrichment score simulations (ESM) will be computed. The value of the ESM only depends on the length of the gene set. Therefore we compute the ESM over a grid of possible gene set lengths which are representative of the lengths of the provided gene sets. Then we fit a generalized additive model model with cubic splines to predict the NES value based on the length of every gene set. This provides a much faster approach that can be very useful when we need to run the software over a huge number of gene sets.
gsea(x,gsets,logScale=TRUE, absVals=FALSE, averageRepeats=FALSE, B=1000, mc.cores=1, test="perm",p.adjust.method="none", pval.comp.method="original",pval.smooth.tail=TRUE,minGenes=10, maxGenes=500,center=FALSE)
ePhenoTest
, numeric
or matrix
object
containing scores (hazard ratios or fold changes).p.adjust
function manual.test
is 'perm' the signature was
permutted and the ES score was recalculated (this happened B times for
each variable, 1000 by default).
If test
is 'wilcox' a wilcoxon test in which we test the fact
that the average value of the genes that do belong to our signtaure is
different from the average value of the genes that do not belong to our
signature will be performed.
If test
is 'ttperm' a permutation t-test will be used.
Take into account that the final plot will be different when 'wilcox' is used.The simulated enrichment scores and the calculated one
are used to find the p value.
P value calculation depends on the parameter
pval.comp.method
. The default value is 'original'. In 'original'
we are simply computing the proportion of anbolute simulated ES which
are larger than the observed absolute ES. In 'signed' we are computing
the proportion of simulated ES which are larger than the observed ES (in
case of having positive enrichment score) and the proportion of
simulated ES which are smaller than the observed ES (in case of having
negative enrichment score).
C.A. Tsai and J.J. Chen. Kernel estimation for adjusted p-values in multiple testing. Computational Statistics & Data Analysis http://econpapers.repec.org/article/eeecsdana/v_3a51_3ay_3a2007_3ai_3a8_3ap_3a3885-3897.htm
#load epheno object
data(epheno)
epheno
#we construct two signatures
sign1 <- sample(featureNames(epheno))[1:20]
sign2 <- sample(featureNames(epheno))[50:75]
mySignature <- list(sign1,sign2)
names(mySignature) <- c('My first signature','My preferred signature')
#run gsea functions
gseaData <- gsea(x=epheno,gsets=mySignature,B=100,mc.cores=1)
my.summary <- summary(gseaData)
my.summary
#plot(gseaData)
Run the code above in your browser using DataLab