calculateEnrichement: Calculate motif Erichment

Description Usage Arguments Examples

View source: R/Small.R

Description

Calculates fisher exact test

Usage

1
calculateEnrichement(foreground, background)

Arguments

foreground

A nsparseMatrix object in each 1 means the motif is found in a region, 0 not.

background

A nsparseMatrix object in each 1 means the motif is found in a region, 0 not.

Examples

1
2
3
4
5
6
7
8
9
foreground <- Matrix::Matrix(sample(0:1,size = 100,replace = TRUE), 
                             nrow = 10, ncol = 10,sparse = TRUE)
rownames(foreground) <- paste0("region",1:10)
colnames(foreground) <- paste0("motif",1:10)
background <- Matrix::Matrix(sample(0:1,size = 100,replace = TRUE), 
                             nrow = 10, ncol = 10,sparse = TRUE)
rownames(background) <- paste0("region",1:10)
colnames(background) <- paste0("motif",1:10)
calculateEnrichement(foreground,background)

ELMER documentation built on Nov. 8, 2020, 4:59 p.m.