segPlot: Plots the data from a copy number array experiment (aCGH,...

Description Usage Arguments Value Author(s) Examples

View source: R/segPlot.R

Description

Plots the data from a copy number array experiment (aCGH, ROMA etc.) along with the results of segmenting it into regions of equal copy numbers.

Usage

1
2
3
4
5
6
  segPlot(x, res, plot.type = "chrombysample",
    altcol = TRUE, sbyc.layout = NULL, cbys.nchrom = 1,
    cbys.layout = NULL, include.means = TRUE,
    zeroline = TRUE, pt.pch = NULL, pt.cex = NULL,
    pt.cols = NULL, segcol = NULL, zlcol = NULL,
    ylim = NULL, lwd = NULL, ...)

Arguments

x

The object that was segmented by fastseg.

res

The result of fastseg.

plot.type

the type of plot. (Default = "s").

altcol

logical flag to indicate if chromosomes should be plotted in alternating colors in the whole genome plot. (Default = TRUE).

sbyc.layout

layout settings for the multifigure grid layout for the ‘samplebychrom’ type. It should be specified as a vector of two integers which are the number of rows and columns. The default values are chosen based on the number of chromosomes to produce a near square graph. For normal genome it is 4x6 (24 chromosomes) plotted by rows. (Default = NULL).

cbys.layout

layout settings for the multifigure grid layout for the ‘chrombysample’ type. As above it should be specified as number of rows and columns and the default chosen based on the number of samples. (Default = NULL).

cbys.nchrom

the number of chromosomes per page in the layout. (Default = 1).

include.means

logical flag to indicate whether segment means are to be drawn. (Default = TRUE).

zeroline

logical flag to indicate whether a horizontal line at y=0 is to be drawn. (Default = TRUE).

pt.pch

the plotting character used for plotting the log-ratio values. (Default = ".")

pt.cex

the size of plotting character used for the log-ratio values (Default = 3).

pt.cols

the color list for the points. The colors alternate between chromosomes. (Default = c("green","black").

segcol

the color of the lines indicating the segment means. (Default = "red").

zlcol

the color of the zeroline. (Default = "grey").

ylim

this argument is present to override the default limits which is the range of symmetrized log-ratios. (Default = NULL).

lwd

line weight of lines for segment mean and zeroline. (Default = 3).

...

other arguments which will be passed to plot commands.

Value

A plot of the values and segments.

Author(s)

klambaue

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(coriell)
head(coriell)
samplenames <- colnames(coriell)[4:5]
data <- as.matrix(coriell[4:5])
chrom <- coriell$Chromosome
maploc <- coriell$Position
library("GenomicRanges")
gr <- GRanges(seqnames=chrom,
		ranges=IRanges(maploc, end=maploc))
mcols(gr) <- data
colnames(mcols(gr)) <- samplenames
res <- fastseg(gr)
segPlot(gr,res)

Example output

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

        Clone Chromosome Position Coriell.05296 Coriell.13330
1  GS1-232B23          1        1      0.000359      0.207470
2  RP11-82d16          1      469      0.008824      0.063076
3  RP11-62m23          1     2242     -0.000890      0.123881
4  RP11-60j11          1     4505      0.075875      0.154343
5 RP11-111O05          1     5441      0.017303     -0.043890
6  RP11-51b04          1     7001     -0.006770      0.094144

fastseg documentation built on Nov. 8, 2020, 7:46 p.m.