motif_peaks | R Documentation |
Using the motif position data from scan_sequences()
(or elsewhere),
test whether certain positions in the sequences have significantly higher
motif density.
motif_peaks(hits, seq.length, seq.count, bandwidth, max.p = 1e-06,
peak.width = 3, nrand = 100, plot = TRUE, BP = FALSE)
hits |
|
seq.length |
|
seq.count |
|
bandwidth |
|
max.p |
|
peak.width |
|
nrand |
|
plot |
|
BP |
|
Kernel smoothing is used to calculate motif position density. The implementation for this process is based on code from the KernSmooth R package (Wand 2015). These density estimates are used to determine peak locations and heights. To calculate the P-values of these peaks, a null distribution is calculated from peak heights of randomly generated motif positions.
If the bandwidth
option is not supplied, then the following code is used
(from KernSmooth):
del0 <- (1 / (4 * pi))^(1 / 10)
bandwidth <- del0 * (243 / (35 * length(hits)))^(1 / 5) * sqrt(var(hits))
A DataFrame
with peak positions and P-values. If plot = TRUE
,
then a list is returned with the DataFrame
as the first item and
the ggplot2
object as the second item.
Benjamin Jean-Marie Tremblay, benjamin.tremblay@uwaterloo.ca
Wand M (2015). KernSmooth: Functions for Kernel Smoothing Supporting Wand and Jones (1995). R package version 2.23-15, <URL: https://CRAN.R-project.org/package=KernSmooth>.
scan_sequences()
data(ArabidopsisMotif)
data(ArabidopsisPromoters)
if (R.Version()$arch != "i386") {
hits <- scan_sequences(ArabidopsisMotif, ArabidopsisPromoters, RC = FALSE)
res <- motif_peaks(as.vector(hits$start), 1000, 50)
# View plot:
res$Plot
# The raw plot data can be found in:
res$Plot$data
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.