calculateEnrichement {ELMER} | R Documentation |
Calculates fisher exact test
calculateEnrichement(foreground, background)
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. |
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)