plotWindows: Plot a binned values of a chromosome

Description Usage Arguments See Also Examples

Description

The plotWindows function visualizes a data.frame produced by the windowValues or windowBf functions.

Usage

1
2
3
plotWindows(seqz.window, m.lty = 1, m.lwd = 3, m.col = "black",
    q.bg = "lightblue", log2.plot = FALSE, n.min = 1, xlim, ylim,
    add = FALSE, ...)

Arguments

seqz.window

data frame of base-pair windows and corresponding quartiles to be plotted. A list of such data frames can be output from windowValues or windowBf.

m.lty

line type used for plotting mean values.

m.lwd

line width used for plotting mean values.

m.col

line color used for plotting mean values.

q.bg

background color for the area between the 0.25 and 0.75 quartiles.

log2.plot

logical, if TRUE values are log2 scaled.

n.min

minimum number of data points required for a binned window to be plotted.

xlim

limits of the x axis.

ylim

limits of the y axis.

add

logical, if TRUE the plot will be added to an existing opened device.

...

any other arguments accepted by plot.

See Also

chromosome.view,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    data.file <-  system.file("extdata", "example.seqz.txt.gz",
        package = "sequenza")
    seqz.data <- read.seqz(data.file)
    # 1Mb windows, each window is overlapping with 1 other adjacent
    # window: depth ratio
    seqz.ratio <- windowValues(x = seqz.data$depth.ratio,
        positions = seqz.data$position, chromosomes = seqz.data$chromosome,
        window = 1e6, weight = seqz.data$depth.normal, start.coord = 1,
        overlap = 1)

    plotWindows(seqz.ratio[[1]], log2.plot = FALSE, ylab = "Depth ratio",
        xlab = "Position (bases)", main = names(seqz.ratio)[1], las = 1,
        n.min = 1, ylim = c(0, 2.5))

    plotWindows(seqz.ratio[[17]], log2.plot = FALSE, ylab = "Depth ratio",
        xlab = "Position (bases)", main = names(seqz.ratio)[1], las = 1,
        n.min = 1, ylim = c(0, 2.5))

Example output



sequenza documentation built on May 9, 2019, 5:04 p.m.