Description Usage Arguments Details Value Author(s) References See Also Examples
Using the motif position data from scan_sequences()
(or elsewhere),
test whether certain positions in the sequences have significantly higher
motif density.
1 2 | 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 \insertCitekernuniversalmotif. 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, b2tremblay@uwaterloo.ca
kernuniversalmotif
1 2 3 4 5 6 7 8 9 10 11 | 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.