Run HOMER motif finding algorithm (findMotifsGenome.pl) to identify motifs enriched for differentially expressed (DE) genomic positions. See http://homer.ucsd.edu for more information.

run_homer(
  de,
  k,
  positions,
  genome = "hg19",
  subset = function(postmean, lpval, lfsr, rank, quantile) lfsr < 0.05,
  homer.exec = "findMotifsGenome.pl",
  out.dir = tempdir(),
  homer.options = "-len 8,10,12 -size 200 -mis 2 -S 25 -p 1 -h",
  verbose = TRUE
)

Arguments

de

An object of class “topic_model_de_analysis”, usually the result of running de_analysis.

k

Use the DE analysis results for this topic.

positions

A table of genomic positions corresponding to rows of the de_analysis results. Specifically, it should a data frame with four columns: “chr”, chromosome name or number; “start”, start position of genomic feature; “end”, end position of genomic feature; and “name”, the name of the genomic feature. If not specified, the genomic positions will be extracted from the row names of de$postmean, in which the row names are expected to be of the form chr_start_end. The genomic positions will be written to a BED file (see https://genome.ucsc.edu/FAQ/FAQformat.html for more information about BED files).

genome

The genome parameter passed to findMotifsGenome.pl.

subset

Describe input argument "subset" here.

homer.exec

The name or file path of the HOMER findMotifsGenome.pl excutable.

out.dir

The positions BED file and HOMER results are written to this directory.

homer.options

Character string used to override default findMotifsGenome.pl options.

verbose

When verbose = TRUE, progress information is printed to the console.

Value

A data frame containing the motif enrichment results. It is created from the knownResults.txt HOMER output.

References

Heinz, S., Benner, C., Spann, N., Bertolino, E., Lin, Y. C., Laslo, P., Cheng, J. X., Murre, C., Singh, H. and Glass, C. K. (2010). Simple combinations of lineage-determining transcription factors prime cis-regulatory elements required for macrophage and B cell identities. Molecular Cell 38, 576-589.