read_motif: Read HOMER Motif Files

Description Usage Arguments Details Value

View source: R/read_results.R

Description

The core function to read in motif files, whether from the HOMER database, from HOMER denovo motif enrichment results, or even custom motifs. In all cases, these files must be in the HOMER-format. See below for more details.

Usage

1
read_motif(path)

Arguments

path

location of motif file

Details

To read-in a HOMER-formatted motif, at a minimum, the first three fields are required to properly ID the motif:

The remaining extra fields of HOMER-formatted motifs are described at the URL below, and primarily meant for interpreting motifs from HOMER's own database. To read more about the HOMER format, see: http://homer.ucsd.edu/homer/motif/creatingCustomMotifs.html

Note that HOMER also has additional information in the motif name regarding its origin and identity. See the internal function .parse_homer_subfields for more info and to break this field up.

Subsequent lines (after the ">") describe the position weight matrix (PWM), with columns in order of A, C, G, T describing the probabilities of per position of each nucleotide.

Note that it is possible to combine complete information (HOMER-formatted) motifs with minimal motifs. Simply use dplyr::bind_rows for easy concatenation despite column spec differences.

Value

at minimum, a tibble with the following columns:

The following columns are presented when available from complete *.motif* files or from HOMER results directories:


robertamezquita/marge documentation built on Sept. 30, 2020, 6:15 a.m.