Find motifs overrepresented 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,
  ...
)

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

...

Arguments passed to MatchRegionStats.

Value

Returns a data frame

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
#> motif observed background percent.observed percent.background #> MA0030.1 MA0030.1 2 0 33.33333 0.00000 #> MA0031.1 MA0031.1 1 0 16.66667 0.00000 #> MA0025.1 MA0025.1 1 1 16.66667 16.66667 #> MA0056.1 MA0056.1 3 4 50.00000 66.66667 #> MA0051.1 MA0051.1 0 0 0.00000 0.00000 #> fold.enrichment pvalue.1 pvalue.0 pvalue.0.1 pvalue.1.1 pvalue.1.2 #> MA0030.1 Inf 1 0 0 1 1 #> MA0031.1 Inf 1 0 0 1 1 #> MA0025.1 1.00 1 0 0 1 1 #> MA0056.1 0.75 1 0 0 1 1 #> MA0051.1 NaN 1 0 0 1 1 #> motif.name #> MA0030.1 FOXF2 #> MA0031.1 FOXD1 #> MA0025.1 NFIL3 #> MA0056.1 MZF1 #> MA0051.1 IRF2