computeEnrichments: Motif enrichment analysis across a database of motifs

Description Usage Arguments Value Examples

View source: R/computeEnrichments.R

Description

Test for motif enrichment in a set of genes of interest. The function performs a fisher exact test to calculte the enrichment of each motif for the set of selected genes, from the background genes in promoter.DB.

Usage

1
computeEnrichments(Genes, promoterDB = "promoter.DB")

Arguments

Genes

list of the genes of interest

promoterDB

promoterDB object

Value

An R object with 3 elements. The element names of the resulting object can be retreived with the function names. Each of the elements is a data frame with motifs on the rows and the enrichment statistics on the columns. Each row corresponds to one-sided fisher.test for motif enirchment in the given gene set, based on occurence of the motif in the plus, minus or both strands combined. The columns of the data frame are:

p.value - the p.value of the Fisher test,

odds.ratio - the estimate of the odds ration from the Fisher test,

genes - subset of the genes that are enirched with the motif and

p.adj.BH - the multiple test correction of the p.value with the "BH" adjustment.

Examples

1
2
3
4
5
# Read an example gene set. 
genes=read.table(system.file("extdata","test_geneSet.txt",package="TFbindR"),stringsAsFactors=F)

# Run the function with the promoterDB generated by the function makePromoterDBfromFIMO.
enrichment=computeEnrichments(as.character(unlist(genes)), "TAIR10_500bp_upstream.fimo.db.rda") 

jsalojar/TFbindR documentation built on Dec. 9, 2019, 12:16 a.m.