Plots average profile of motif occurrence for a set of input sequences of the
same length. Motif is specified by a position weight matrix (PWM) that contains
estimated probability of base b at position i, and only motif hits above
specified threshold are taken into account.
A DNAStringSet object. Set of sequences of the same length
for which the patterns occurrence profile should be visualised.
motifPWM
A numeric matrix representing the Position Weight Matrix (PWM), such as
returned by PWM function. Can contain either probabilities
or log2 probability ratio of base b at position i.
minScore
The minimum score for counting a motif hit. Can be given as a character
string containing a percentage (e.g."85%") of the
PWM score or a single number specifying score threshold. If a percentage
is given, it is converted to a score value taking into account both
minimal and maximal possible PWM scores as follows:
minPWMscore + percThreshold/100 * (maxPWMscore - minPWMscore)
This differs from the formula in the matchPWM function
from the Biostrings package which takes into account only the
maximal possible PWM score and considers the given percentage as the
percentage of that maximal score:
percThreshold/100 * maxPWMscore
flankUp, flankDown
The number of base-pairs upstream and downstream of the reference
position in the provided sequences, respectively.
flankUp + flankDown must sum up to the length of the sequences.
If no values are provided both flankUp and flankDown are
set to be half of the length of the input sequences, i.e. the
reference position is assumed to be in the middle of the sequences.
smoothingWindow
Integer specifying the size of a window (in base-pairs) to be used for
smoothing the signal. Default value of 1 corresponds to no smoothing.
color
Value specifying the color for plotting.
xLabel, yLabel
Character strings for x and y axis labels, respectively.
cexAxis
The magnification to be used for axis annotation relative to the current
setting of cex.
addReferenceLine
Logical, should the vertical dashed line be drawn at the reference
point.
plotLegend
Logical, should the legend be plotted at the top.
cexLegend
The magnification to be used for legend relative to the current setting
of cex.
add
Logical, should the pattern occurrence profiles be added to the existing
plot.
...
Further arguments to be passed to plot() or lines()
methods, such as lty, etc.
Value
The function finds all hits matching the motif above the specified score
threshold in the set of input sequences and plots an average profile
reflecting the occurrence of the motif across input sequences.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(seqPattern)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/seqPattern/plotMotifOccurrenceAverage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotMotifOccurrenceAverage
> ### Title: Plotting average profile of motif occurrence
> ### Aliases: plotMotifOccurrenceAverage
> ### plotMotifOccurrenceAverage,DNAStringSet,matrix-method
>
> ### ** Examples
>
> load(system.file("data", "zebrafishPromoters.RData", package="seqPattern"))
> load(system.file("data", "TBPpwm.RData", package="seqPattern"))
>
> plotMotifOccurrenceAverage(regionsSeq = zebrafishPromoters, motifPWM = TBPpwm,
+ minScore = "85%", flankUp = 400, flankDown = 600,
+ smoothingWindow = 3)
Getting motif occurrence matrix...
Plotting average signal...
There were 12 warnings (use warnings() to see them)
>
>
>
>
>
> dev.off()
null device
1
>