Create a minimal HOMER formatted motif file based on PWM and required motif info.

write_homer_motif(motif_pwm, motif_name, log_odds_detection, consensus = NULL,
  file, append = TRUE)

Arguments

motif_pwm

tibble with alphabet columns

motif_name

name of the sequence

log_odds_detection

the threshold for detecting given motif

consensus

the accepted consensus motif sequence [optional: calculated from pwm if not provided]

file

path to new motif file; suffix should be '.motif'

append

whether to overwrite existing file [default: TRUE, e.g. add on to existing file]

Value

nothing; called for its side-effect of producing HOMER motif file

Examples

# NOT RUN {
knw_pwm <- read_known_results("inst/extdata/knownResults.txt", homer_dir = FALSE)

## Write multiple motifs
pwalk(list(motif_pwm = knw_pwm$motif_pwm,
           motif_name = knw_pwm$motif_name,
           log_odds_detection = knw_pwm$log_odds_detection),
      write_homer_motif, file = "test.motif", append = TRUE)
# }