plotAlongChrom {tilingArray} | R Documentation |
Plot the results of segmentation along a chromosomal region
plotAlongChrom(chr, coord, highlight, segObj, y, ylim, nrBasesPerSeg, probeAnno, gff, colors, featColScheme=1, isDirectHybe=FALSE, scoreShow = "pt", haveNames=TRUE, haveLegend=TRUE, main="", pointSize=unit(0.6, "mm"))
chr |
integer of length 1 with the number of the chromosome for which to make the plot. |
coord |
integer of length 2 with start and end coordinates of the plot. |
highlight |
optional, list with two elements: a single numeric value
coord and a character strand . If present, this
position is marked by a vertical red bar on the coordinate axis. |
segObj |
environment containing three types of data
|
y |
numeric vector of intensities from an array, see Paragraph Intensities in the Details section. |
ylim |
numeric vector of length two with y-axis limits. |
nrBasesPerSeg |
numeric scalar. If segObj does not
contain a segScore data.frame, then this parameter allows to
choose the parameter which controls the number of segments in the
segmentation (called S in the paper). In particular, this
parameter specifies the average length of segments, measured in bases,
thus one value can be used for all chromosomes. |
probeAnno |
environment with probe annotations, see vignette. |
gff |
data frame with genome annotation from the GFF file. |
colors |
named character vector, optional. If missing,
the following default is used:
c("+"="#00441b", "-"="#081d58", "duplicated"="grey", "cp"="#101010",
"highlight"="red", "threshold"="grey") ,
where the first three elements refer to colors of data points and the
last three to those of lines in the plot. |
featColScheme |
numeric scalar, used to select a color scheme for the boxes representing genomic features such as coding sequences, ncRNAs etc. Currently the values 1 and 2 are supported. |
isDirectHybe |
logical scalar: if TRUE, the mapping of probes to genomic strands is reversed with respect to the default. This is appropriate for data from a direct RNA hybridization that used no reverse transcription. |
scoreShow |
character: name of a column in segScore that
is to be used for the coloring of the segments. |
haveNames |
logical; should their names be added to the feature symbols? |
haveLegend |
logical: should the plot contain a legend? |
main |
character: plot title. |
pointSize |
unit object: point size used for the probe intensities scatterplot. |
Intensities: There are two alternative, mutually exclusive ways of providing the intensities to be plotted to this function.
y
and probeAnno
. Then,
y
is a vector of intensities, and probeAnno
is an
environment that contains integer vectors with start positions along
the chromosomes and indices in y
of the probes. 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"
, respectively.
segRes
. In that case,
the intended workflow for using this function is as follows:
First, use the script segment.R
to generate a segmentation.
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, the script viewsegmentation.R
can be used to view the
segmentation results. It collects the R
objects in these
.rda
files into the environment segRes
, with which it calls
this function.
Furthermore, the script scoreSegments.R
can be used to
calculate scores for each segment, which can be passed to this
function using the segRes
argument.
Wolfgang Huber <huber@ebi.ac.uk>
##