Learn R Programming

copynumber (version 1.12.0)

plotAberration: Plot areas with copy number aberrations

Description

Create plots reflecting the location of aberrated segments. Results may be visualized over the entire genome or by chromosomes.

Usage

plotAberration(segments, thres.gain, thres.loss = -thres.gain, pos.unit = "bp", 
    chrom = NULL, layout = c(1, 1),...)

Arguments

segments
a data frame containing the segmentation results found by either pcf or multipcf.
thres.gain
a numeric vector giving the threshold value(s) to be applied for calling gains.
thres.loss
a numeric vector of same length as thres.gain giving the threshold value(s) to be applied for calling losses. Default is to use the negative value of thres.gain.
pos.unit
the unit used to represent the probe positions. Allowed options are "mbp" (mega base pairs), "kbp" (kilo base pairs) or "bp" (base pairs). By default assumed to be "bp".
chrom
a numeric or character vector with chromosome number(s) to indicate which chromosome(s) is (are) to be plotted. If unspecified the whole genome is plotted.
layout
the vector of length two giving the number of rows and columns in the plot window. Default is c(1,1).
...
other optional graphical parameters. These include the plot arguments xlab, ylab, main, cex.main, mgp, cex.lab, cex.axis, mar and title (see par on these), as well as plot.size, plot.unit, plot.ideo, ideo.frac, cyto.text, assembly and cex.cytotext (see plotSample on these). In addition, a range of graphical arguments specific for this plot function may be specified: [object Object],[object Object],[object Object],[object Object],[object Object]

Details

For each sample, the aberrated regions are shown in the color specified in colors[1] (default dodgerblue) if the segment value is below thres.loss and the color specified in colors[2] (default red) if the segment value is above thres.gain. Non-aberrated regions are shown in white. Each row in the plot represents a sample, while probe positions are reflected along the x-axis.

Examples

Run this code
#Load lymphoma data
data(lymphoma)

#Run pcf to obtain estimated copy number values
seg <- pcf(data=lymphoma,gamma=12)

#Plot aberrations for the entire genome
plotAberration(segments=seg,thres.gain=0.15)

#Plot aberrations for the first 4 chromosomes:
plotAberration(segments=seg,thres.gain=0.1,chrom=c(1:4),layout=c(2,2))

Run the code above in your browser using DataLab