gsea: Gene Set Enrichment Analyses

GSEAR Documentation

Gene Set Enrichment Analyses

Description

This function performs gene set enrichment analysis.

Usage

GSEA(x, go, alpha=1, permutations=1000, ncores=1, iseed=12345)
fGSEA(x, go, alpha=1, permutations=1000, ncores=1, iseed=12345)

Arguments

x

data.frame, with at least two columns. See Details.

go

vector, a set of genes.

alpha

power to scale the weights. See Details.

permutations

number of permutations to estimate P value of the enrichment score.

ncores

number of CPU cores to be used.

iseed

integer, used as a seed for random number generation.

Details

x is a data.frame with at least two columns: the first column is a vector of gene ids and the second column is a vector of phenotype association statistics, eg, log fold change, or t-test statistics, whose sign and absolute values denote the direction and strength of the association. alpha is power to scale the weights: 0 (unweighted = Kolmogorov-Smirnov), 1 (weighted), and 2 or larger (over-weighted).

Value

GSEA produces a gsea object, which is a list with the elements:

ES

enrichment score

indicator

a vector of integers indicating the location of the genes of interest

RES

a vector of running enrichment scores

NES

normalized enrichment score accounted for the gene set size

Pvalue

p value of the enrichment score estimated by permutations

See Also

plot.gsea, print.gsea, msigdb.gsea

Examples

#example usage
#create a random data set
set.seed(1234)
n=10000
x=data.frame(ID=paste0('Gene',1:n),strength=sort(rnorm(n,0,1)),stringsAsFactors=FALSE)
fit1=GSEA(x=x,go=paste0('Gene',sample(n,100)))
plot(fit1)

mw201608/GOtest documentation built on May 3, 2023, 11:49 a.m.