R: Plotting average profile of sequence pattern occurrence
plotPatternOccurrenceAverage
R Documentation
Plotting average profile of sequence pattern occurrence
Description
Plots average profile of sequence pattern occurrence for a set of input sequences of the same length. Multiple sequence patterns can be processed at once and visualised in the same plot, allowing comparison across different patterns.
A DNAStringSet object. Set of sequences of the same length
for which the patterns occurrence profile should be visualised.
patterns
Character vector specifying one or more DNA sequence patterns
(oligonucleotides). IUPAC ambiguity codes can be used and will match any
letter in the subject that is associated with the code.
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
A vector of values specifying the colors for plotting. Number of colors
must match the number of patterns that should be plotted.
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.
useMulticore
Logical, should multicore be used. useMulticore = TRUE is
supported only on Unix-like platforms.
nrCores
Number of cores to use when useMulticore = TRUE. Default value
NULL uses all detected cores.
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 specified patterns in the set of
input sequences and plots one average profile per pattern reflecting the
occurrence of patterns across 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/plotPatternOccurrenceAverage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotPatternOccurrenceAverage
> ### Title: Plotting average profile of sequence pattern occurrence
> ### Aliases: plotPatternOccurrenceAverage
> ### plotPatternOccurrenceAverage,DNAStringSet-method
>
> ### ** Examples
>
> load(system.file("data", "zebrafishPromoters.RData", package="seqPattern"))
>
> # dinucleotide patterns
> plotPatternOccurrenceAverage(regionsSeq = zebrafishPromoters, patterns = c("AT",
+ "TA", "CG", "GC"), flankUp = 400, flankDown = 600, smoothingWindow =
+ 3, color = c("gold", "darkred", "forestgreen", "navy"))
Getting oligonucleotide occurrence matrix...
Plotting average signal...
>
> # motif consensus sequence
> plotPatternOccurrenceAverage(regionsSeq = zebrafishPromoters, patterns =
+ "TATAWAWR", flankUp = 400, flankDown = 600, smoothingWindow = 3,
+ color = "gray")
Getting oligonucleotide occurrence matrix...
Plotting average signal...
>
>
>
>
>
> dev.off()
null device
1
>