plotPatternDensityMap(regionsSeq, patterns, seqOrder = c(1:length(regionsSeq)), flankUp = NULL, flankDown = NULL, nBin = NULL, bandWidth = NULL, color = "blue", transf = NULL, xTicks = NULL, xTicksAt = NULL, xLabel = "", yTicks = NULL, yTicksAt = NULL, yLabel = "", cexAxis = 8, plotScale = TRUE, scaleLength = NULL, scaleWidth = 15, addPatternLabel = TRUE, cexLabel = 8, labelCol = "black", addReferenceLine = TRUE, plotColorLegend = TRUE, outFile = "PatternDensityMap", plotWidth = 2000, plotHeight = 2000, useMulticore = FALSE, nrCores = NULL)DNAStringSet object. Set of sequences of the same length
for which the patterns occurrence density should be visualised.
regionSeq. Input sequences will be sorted according to this index
in an ascending order form top to the bottom of the plot, i.e.
the sequence labeled with the lowest number will appear at the top of
the plot. The default value will order the sequences as they are ordered
in the input regionSeq object.
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.
gridsize argument of the
bkde2D function to compute a 2D binned kernel density
estimate. If nBin is not specified it will default to
c(n, m), where n is the number of input sequences and
m is the length of sequences.
bandwidth argument of the bkde2D function to
compute a 2D binned kernel density estimate and are used as standard
deviation of the bivariate Gaussian kernel. If bandWidth is not
specified it will default to c(3,3).
"blue", "brown",
"cyan", "gold", "gray", "green", "pink", "purple", "red". Please refer
to the vignette for the appearance of these palettes.
NULL value produces five tick-marks: one at the
reference point and two equally spaced tick-marks both upstream and
downstream of the reference point.
NULL value produces five
tick-marks: one at the reference point and two equally spaced tick-marks
both upstream and downstream of the reference point.
NULL value produces no tick-marks and labels.
NULL value produces no
tick-marks.
plotScale = TRUE. If no value is provided, it defaults to one
fifth of the input sequence length.
plotScale = TRUE.
TRUE a separate .png file named outFile."ColorLegend.png"
will be created, showing mapping of pattern density values to colours.
outFile."pattern.png".
useMulticore = TRUE is
supported only on Unix-like platforms.
useMulticore = TRUE. Default value
NULL uses all detected cores.
getPatternOccurrenceList
plotMotifDensityMap
library(GenomicRanges)
load(system.file("data", "zebrafishPromoters.RData", package="seqPattern"))
promoterWidth <- elementMetadata(zebrafishPromoters)$interquantileWidth
# dinucleotide patterns
plotPatternDensityMap(regionsSeq = zebrafishPromoters, patterns = c("TA", "GC"),
seqOrder = order(promoterWidth), flankUp = 400, flankDown = 600,
color = "blue")
# motif consensus sequence
plotPatternDensityMap(regionsSeq = zebrafishPromoters, patterns = "TATAWAWR",
seqOrder = order(promoterWidth), flankUp = 400, flankDown = 600,
color = "cyan")
Run the code above in your browser using DataLab