findMatchesByChromosomalRegion,MotifMatcher-method | R Documentation |
Given a MotifMatcher object, a table of chromosomal regions, and a minimum match percentage, pull out a list containing a data frame of the motifs in those regions and a character vector of their associated transcription factors.
## S4 method for signature 'MotifMatcher'
findMatchesByChromosomalRegion(
obj,
tbl.regions,
pwmMatchMinimumAsPercentage,
variants = NA_character_
)
obj |
An object of class MotifMatcher |
tbl.regions |
A data frame where each row contains a chromosomal region with the fields "chrom", "start", and "end". |
pwmMatchMinimumAsPercentage |
A percentage (0-100) used as a cutoff for what constitutes a motif match |
variants |
A character containing variants to use for the matching (default = NA_character_).
The variants should either have the same number of entries as rows in the |
A list containing a data frame of the motifs in the given regions and a character vector of their associated transcription factors
## Not run:
# Perform a simple match in the rs13384219 neighborhood
library(MotifDb)
motifMatcher <- MotifMatcher(genomeName="hg38",
pfms = as.list(query(query(MotifDb, "sapiens"),"jaspar2016")), quiet=TRUE)
tbl.regions <- data.frame(chrom="chr2", start=57907313, end=57907333, stringsAsFactors=FALSE)
x <- findMatchesByChromosomalRegion(motifMatcher, tbl.regions, pwmMatchMinimumAsPercentage=92)
# Perform the same match, but now include a variant
x.mut <- findMatchesByChromosomalRegion(motifMatcher, tbl.regions,
pwmMatchMinimumAsPercentage=92, variants = "rs13384219")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.