Learn R Programming

exomeCopy (version 1.18.0)

plotCompiledCNV: Plot compiled CNV segments for one sequence/chromosome

Description

This function takes a RangedData object as produced by compileCopyCountSegments and plots the CNV segments for one sequence/chromosomes across the samples with CNV segments.

The segments in the normal state should be removed as shown below in the example to produce a cleaned RangedData object. See the vignette for a more complete example.

Usage

plotCompiledCNV(CNV.segments, seq.name, xlim=NULL, col=NULL, copy.counts=0:6, normal.state = 2)

Arguments

CNV.segments
A RangedData object as produced by compileCopyCountSegments and with normal state removed.
seq.name
The name of the sequence to plot
xlim
The genomic coordinates for the x axis. If not included, the plotting window will cover the range of the CNVs in CNV.segments
col
The colors to use for the different copy count states
copy.counts
The corresponding copy counts for the colors
normal.state
The copy count of the normal state

Value

Produces a plot.

Examples

Run this code
  example(compileCopyCountSegments)
  CNV.clean <- CNV.segments[CNV.segments$copy.count != 2,]
  chr.start <- start(range(fit@ranges)[["chr1"]])
  chr.end <- end(range(fit@ranges)[["chr1"]])
  plotCompiledCNV(CNV.clean, "chr1", xlim=c(chr.start,chr.end))

Run the code above in your browser using DataLab