enrichment: Enrichment Analysis by Hypergeometric Distribution Test

Description Usage Arguments Value Examples

View source: R/enrichment.R

Description

Enrichment Analysis by Hypergeometric Distribution Test

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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")

eegc documentation built on Nov. 8, 2020, 5:27 p.m.