Create a motif x feature matrix from a set of genomic ranges, the genome, and a set of position weight matrices.
CreateMotifMatrix(
features,
pwm,
genome,
score = FALSE,
use.counts = FALSE,
sep = c("-", "-"),
...
)
A GRanges object containing a set of genomic features
A PFMatrixList
or
PWMatrixList
object containing position weight/frequency matrices to use
Any object compatible with the genome
argument
in matchMotifs
Record the motif match score, rather than presence/absence (default FALSE)
Record motif counts per region. If FALSE (default),
record presence/absence of motif. Only applicable if score=FALSE
.
A length-2 character vector containing the separators to be used when constructing matrix rownames from the GRanges
Additional arguments passed to
matchMotifs
Returns a sparse matrix
Requires that motifmatchr is installed https://www.bioconductor.org/packages/motifmatchr/.