enrichment: Enrichment Analysis by Hypergeometric Distribution Test

View source: R/enrichment.R

enrichmentR Documentation

Enrichment Analysis by Hypergeometric Distribution Test

Description

Enrichment Analysis by Hypergeometric Distribution Test

Usage

enrichment(cate.gene, annotated.gene, background.gene, padjust.method = "fdr" )

Arguments

cate.gene

a list of the five gene categories, alternatively output by categorizeGene.

annotated.gene

a list of annotated gene sets which the cate.gene are enriched in.

background.gene

vector of background genes, e.g. all genes screened by microarray or RNA-sequencing.

padjust.method

correction method for enrichment p-values, one of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none", default to "fdr", see details in p.adjust.

Value

A list of enrichment results for the five gene categories.

Examples

# load the cell/tissue-specific genes
data(tissueGenes)
# load the mapping file of cells/tissues to grouped cells/tissues
data(tissueGroup)

# get the background genes
data(expr.filter)
genes = rownames(expr.filter)
# enrichment analysis for the five gene categories
data(cate.gene)
tissueenrich = enrichment(cate.gene = cate.gene, annotated.gene = tissueGenes,
                         background.gene = genes, padjust.method = "fdr")
# select a group of cells/tissues
tissueGroup.selec = c("stem cells","B cells","T cells","Myeloid","Endothelial CD105+")
tissues.selec = tissueGroup[tissueGroup[,"Group"] %in% tissueGroup.selec,c(2,3)]
# tissuetable = heatmapPlot(tissueenrich, terms = tissues.selec, GO=FALSE,
#                           annotated_row = TRUE,annotation_legend = TRUE,
#                           main = "Tissue-specific enrichment")

Sharonxiaoyuan/eegc documentation built on April 17, 2022, 2:10 a.m.