Learn R Programming

conumee (version 1.4.2)

CNV.genomeplot: CNV.genomeplot

Description

Create CNV plot for the whole genome or chromosomes.

Usage

CNV.genomeplot(object, ...)
"CNV.genomeplot"(object, chr = "all", chrX = TRUE, chrY = TRUE, centromere = TRUE, detail = TRUE, main = NULL, ylim = c(-1.25, 1.25), set_par = TRUE, cols = c("red", "red", "lightgrey", "green", "green"))
"plot"(x, y = NULL, ...)

Arguments

object
CNV.analysis object.
...
Additional parameters supplied to CNV.genomeplot.
chr
character vector. Which chromomsomes to plot. Defaults to 'all'.
chrX
logical. Plot values for chrX? Defaults to TRUE. Set CNV.create_anno(chrXY = FALSE) if chrX and Y should not be included at all.
chrY
logical. Plot values for chrY? Defaults to TRUE.
centromere
logical. Show dashed lines at centromeres? Defaults to TRUE.
detail
logical. If available, include labels of detail regions? Defaults to TRUE.
main
character. Title of the plot. Defaults to sample name.
ylim
numeric vector. The y limits of the plot. Defaults to c(-1.25, 1.25).
set_par
logical. Use recommended graphical parameters for oma and mar? Defaults to TRUE. Original parameters are restored afterwards.
cols
character vector. Colors to use for plotting intensity levels of bins. Centered around 0. Defaults to c('red', 'red', 'lightgrey', 'green', 'green').
x
CNV.analysis object (defined by plot generic).
y
NULL (defined by plot generic).

Value

NULL.

Details

This method provides the functionality for generating CNV plots for the whole genome or defined chromosomes. Bins are shown as dots, segments are shown as lines. See parameters for more information.

Examples

Run this code
# prepare
library(minfiData)
data(MsetEx)
d <- CNV.load(MsetEx)
data(detail_regions)
anno <- CNV.create_anno(detail_regions = detail_regions)

# create/modify object
x <- CNV.segment(CNV.detail(CNV.bin(CNV.fit(query = d['GroupB_1'],
    ref = d[c('GroupA_1', 'GroupA_2', 'GroupA_3')], anno))))

# output plots
CNV.genomeplot(x)
CNV.genomeplot(x, chr = 'chr6')
CNV.detailplot(x, name = 'PTEN')
CNV.detailplot_wrap(x)

# output text files
CNV.write(x, what = 'segments')
CNV.write(x, what = 'detail')
CNV.write(x, what = 'bins')
CNV.write(x, what = 'probes')

Run the code above in your browser using DataLab