plotAlongChrom(segObj, y, probeAnno, gff, isDirectHybe=FALSE, what = c("dots"), ## "heatmap" chr, coord, highlight, colors, doLegend=FALSE, featureExclude=c("chromosome", "nucleotide_match", "insertion"), featureColorScheme=1, extras, rowNamesHeatmap, rowNamesExtras, ylab, ylabExtras, main, colHeatmap=colorRamp(brewer.pal(9, "YlGnBu")), colExtras=colorRamp(brewer.pal(9, "Reds")), sepPlots=FALSE, reOrder=TRUE, ...)segmentation.
See Details.davidTiling for an example.dots to plot each probe intensity with a point, or heatmap to produce a colorscale representation of the intesities.coord and a character strand. If present, this
position is marked by a vertical red bar on the coordinate axis. The color can be changed using the colors argument below.c("+"="#00441b", "-"="#081d58", "duplicated"="grey", "cp"="#101010",
"highlight"="red", "threshold"="grey"),
where the first three elements refer to the colors of data points and the
last three to the colors of lines in the plot.gff) that should not be plotted. Default is "chromosome",
"nucleotide_match" and "insertion". Additional possibilities
include: "ARS", "repeat\_region",
"repeat\_family" and "nc\_primary\_transcript".plotAlongChromLegend or plotFeatures for further information).y is specified. These values should be on the scale [0,1].extras panel (if specified).YlGnBu from RColorBrewer package).Reds from RColorBrewer package).segObj or
y is plotted separately (maximum of 3) in the same figure. When FALSE, the average
is plotted. This argument is only used when what is set to dots.what option above (see
plotSegmentationDots and
plotSegmentationHeatmap) or gff plotting (see plotFeatures and plotAlongChromLegend).y and probeAnno. In this case,
y is a matrix of intensities, whose rows correspond to probes
on the array, and its columns to different conditions, time points, etc.
It is also acceptable that y is provided as a vector, in
which case it is converted to an nrow(y) x 1 matrix.
probeAnno is an
environment whose elements correspond to target sequences (e.g.
chromosome strands) and that contain integer vectors of length
nrow(y) with information about the probes: start and end positions of
their alignment to the target sequence, their row indices in
y, the type of alignment (is it perfect? is is unique?).
For example,
the start positions and indices of probes for the + strand of
chromosome 1 would be described by environment elements
"1.+.start" and "1.+.index".
segObj.
segObj: This can be either an object of S4 class
segmentation or an environment that by convention contains a
certain set of objects.
Future work on this package
will focus on the S4 class segmentation. The environment
option is provided for backward compatibility.
Explanation of the environment: the intended workflow is as follows:
Use the script segment.R (in the inst/scripts directory of this
package) to generate segmentations.
This can be run in parallel on several processors, separately for each
chromosome and strand. The results of this are stored in files of the
name 1.+.rda, 1.-.rda, 2.+.rda, and so forth,
typically within a dedicated directory.
Then use the script readSegments.R to collect the
R objects in these .rda files into the environment.
It contains three types of data:
segScore with segment scores; it can
be missing iff nrBasesPerSeg is present,
theThreshold, which is used to
draw a horizontal "threshold" line in the plot.
... and the different signal visualization methods (what option):
If what=="dots", the argument showConfidenceIntervals
can be a logical scalar to choose whether vertical dashed lines are
drawn for the confidence interval. In any case, these are only drawn
if they are present in the segmentation object in segObj.
## 1. see viewSegmentation.R script in the inst/scripts directory
## 2. (newer): segmentation.Rnw
## 3. (newer): see the plotALongChrom vignette
data(segnf)
data(gffSub)
nmLabel = colnames(segnf$"1.+"@y)
plotAlongChrom(segnf,chr=1,coord=c(35000,50000),
gff=gffSub,rowNamesHeatmap=nmLabel) ##the dots
plotAlongChrom(segnf,chr=1,coord=c(35000,50000),what="heatmap",
gff=gffSub,rowNamesHeatmap=nmLabel) ##the heatmap
plotAlongChrom(segnf,chr=1,coord=c(35000,50000),gff=gffSub,
showConfidenceIntervals=FALSE) ##do not show the segment confidence interval
Run the code above in your browser using DataLab