homerToPFMatrixList: Read a HOMER motif file and create a PFMatrixList

View source: R/motif_enrichment_HOMER.R

homerToPFMatrixListR Documentation

Read a HOMER motif file and create a PFMatrixList

Description

Read motifs from a file in HOMER format and create a PFMatrixList from them.

Usage

homerToPFMatrixList(filename, n = 100L)

Arguments

filename

Name of the input file with HOMER-formatted motifs.

n

The number of observations (multiplied with base frequencies to create the number of observed bases at each position).

Value

A PFMatrixList with motifs from the file.

See Also

dumpJaspar for writing motifs from a Jaspar database package into a file in HOMER format.

Examples

library(JASPAR2020)
optsL <- list(ID = c("MA0006.1"))
pfm1 <- TFBSTools::getMatrixSet(JASPAR2020, opts = optsL)
TFBSTools::Matrix(pfm1)

tmpfn <- tempfile()
dumpJaspar(filename = tmpfn, pkg = "JASPAR2020", opts = optsL)
pfm2 <- homerToPFMatrixList(tmpfn)
TFBSTools::Matrix(pfm2)

unlink(tmpfn)


fmicompbio/monaLisa documentation built on July 10, 2024, 8:44 a.m.