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.
FindMotifs(
object,
features,
background = 40000,
assay = NULL,
verbose = TRUE,
p.adjust.method = "BH",
...
)
A Seurat object
A vector of features to test for enrichments over 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.
Which assay to use. Default is the active assay
Display messages
Multiple testing correction method to be applied.
Passed to p.adjust
.
Arguments passed to MatchRegionStats
.
Returns a data frame
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
#> MA0030.1 MA0030.1 1 0 16.66667 0.00000
#> MA0066.1 MA0066.1 1 0 16.66667 0.00000
#> MA0051.1 MA0051.1 1 1 16.66667 16.66667
#> MA0057.1 MA0057.1 1 1 16.66667 16.66667
#> MA0059.1 MA0059.1 1 1 16.66667 16.66667
#> MA0069.1 MA0069.1 1 1 16.66667 16.66667
#> MA0056.1 MA0056.1 4 5 66.66667 83.33333
#> MA0070.1 MA0070.1 0 1 0.00000 16.66667
#> MA0025.1 MA0025.1 0 0 0.00000 0.00000
#> MA0031.1 MA0031.1 0 0 0.00000 0.00000
#> fold.enrichment pvalue motif.name p.adjust
#> MA0030.1 Inf 0 FOXF2 0
#> MA0066.1 Inf 0 PPARG 0
#> MA0051.1 1.0 1 IRF2 1
#> MA0057.1 1.0 1 MZF1(var.2) 1
#> MA0059.1 1.0 1 MAX::MYC 1
#> MA0069.1 1.0 1 Pax6 1
#> MA0056.1 0.8 1 MZF1 1
#> MA0070.1 0.0 1 PBX1 1
#> MA0025.1 NaN 1 NFIL3 1
#> MA0031.1 NaN 1 FOXD1 1