Find motifs over-represented in a given set of genomic features. Computes the number of features containing the motif (observed) and compares this to the total number of features containing the motif (background) using the hypergeometric test.
Usage
FindMotifs(
object,
features,
background = 40000,
assay = NULL,
verbose = TRUE,
p.adjust.method = "BH",
...
)Arguments
- object
A Seurat object
- features
A vector of features to test for enrichments over background
- background
Either a vector of features to use as the background set, or a number specify the number of features to randomly select as a background set. If a number is provided, regions will be selected to match the sequence characteristics of the query features. To match the sequence characteristics, these characteristics must be stored in the feature metadata for the assay. This can be added using the
RegionStats()function. If NULL, use all features in the assay.- assay
Which assay to use. Default is the active assay
- verbose
Display messages
- p.adjust.method
Multiple testing correction method to be applied. Passed to
stats::p.adjust().- ...
Arguments passed to
MatchRegionStats().
Examples
de.motif <- head(rownames(atac_small))
bg.peaks <- tail(rownames(atac_small))
FindMotifs(
object = atac_small,
features = de.motif,
background = bg.peaks
)
#> Testing motif enrichment in 6 regions
#> Warning: Testing motif enrichment using a small number of regions is not recommended
#> motif observed background percent.observed percent.background
#> MA0040.1 MA0040.1 2 0 33.33333 0.00000
#> MA0041.1 MA0041.1 1 0 16.66667 0.00000
#> MA0029.1 MA0029.1 2 2 33.33333 33.33333
#> MA0006.1 MA0006.1 0 2 0.00000 33.33333
#> MA0057.1 MA0057.1 0 1 0.00000 16.66667
#> MA0004.1 MA0004.1 0 0 0.00000 0.00000
#> MA0019.1 MA0019.1 0 0 0.00000 0.00000
#> MA0030.1 MA0030.1 0 0 0.00000 0.00000
#> MA0031.1 MA0031.1 0 0 0.00000 0.00000
#> MA0051.1 MA0051.1 0 0 0.00000 0.00000
#> fold.enrichment pvalue motif.name p.adjust
#> MA0040.1 Inf 0 Foxq1 0
#> MA0041.1 Inf 0 Foxd3 0
#> MA0029.1 1 1 Mecom 1
#> MA0006.1 0 1 Ahr::Arnt 1
#> MA0057.1 0 1 MZF1(var.2) 1
#> MA0004.1 NaN 1 Arnt 1
#> MA0019.1 NaN 1 Ddit3::Cebpa 1
#> MA0030.1 NaN 1 FOXF2 1
#> MA0031.1 NaN 1 FOXD1 1
#> MA0051.1 NaN 1 IRF2 1