getSequence.Rd
Given a MotifMatcher object, a table of chromosomal regions, and an optional set of variants, return the sequences as a new column of the table.
# S4 method for MotifMatcher getSequence(obj, tbl.regions, 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". |
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 |
The tbl.regions
data frame with an added column containing the sequence for each
entry
if (FALSE) { # Retrieve the sequences for the rs13384219 neighborhood library(MotifDb) motifMatcher <- MotifMatcher(genomeName="hg38", pfms = as.list(query(query(MotifDb, "sapiens"), "jaspar2016"))) tbl.regions <- data.frame(chrom="chr2", start=57907313, end=57907333, stringsAsFactors=FALSE) x <- findMatchesByChromosomalRegion(motifMatcher, tbl.regions, pwmMatchMinimumAsPercentage=92) # Retrieve the sequences, but now include a variant x.mut <- findMatchesByChromosomalRegion(motifMatcher, tbl.regions, pwmMatchMinimumAsPercentage=92, "rs13384219") }