Reads in results from all individual info.html files produced by HOMER de novo motif enrichment analysis.

read_denovo_html_results(path, homer_dir = TRUE)

Arguments

path

path to the HOMER directory where all outputs are stored

homer_dir

does the path point to a HOMER directory; if FALSE, path must point to the file directly [default: TRUE]

Value

a list with the following structure:

  • Motif_information a dataframe with most of the info returned by read_denovo_results

  • Matches_to_known_motifs Dataframe with information on related known motifs matched to the de novo motif

The Motif_information dataframe has the following columns:

  • motif_name name of the motif

  • consensus the consensus sequence of the denovo motif

  • p_value final enrichment from experiment (p-value)

  • log_p_value final enrichment from experiment -log10(p-value)

  • info_content information Content per bp

  • tgt_num number of times motif appears in target sequences

  • tgt_pct percent of times motif appears in target sequences

  • bgd_num number of times motif appears in background sequences

  • bgd_pct percent of times motif appears in background sequences

  • tgt_pos average position of motif in target sequences, where 0 = start of sequences

  • bgd_pos average position of motif in background sequences

  • strand_bias strand Bias (log2 ratio + to - strand density)

  • multiplicity multiplicity (# of sites on avg that occur together)

#' The Matches_to_known_motifs dataframe has the following columns:

  • motif_name name of the motif

  • motif_family family of the motif

  • ID ID of the motif or the experiment

  • database database of the motif

  • rank match rank

  • score log odds score of the motif matrix, higher scores are better matches

  • offset from the center of the region

  • orientation forward or reverse (on average?)

  • original_alignment consensus sequence for comparison

  • matched_alignment matched sequence with mismatches in "-" from the consensus. Can be offset.

#' @importFrom stringr str_replace str_split str_detect

Details

Following an analysis using find_motifs_genome, a HOMER directory is created which analyses the enrichment of known motifs. This function reads and parses in the .html file into a tidy format.

It might be more useful to read in the .html files instead of the .motifs file because the .html contain information on known similar motifs.