draw.pileup: Pileup plot of a BAM track

View source: R/draw.pileup.R

draw.pileupR Documentation

Pileup plot of a BAM track

Description

This function draws a slice of a sequence pileup, highlighting polymorphisms.

Usage

  draw.pileup(slice, start, end, ylim = NA, bty = "o", label = TRUE, labelCex = 0.75,
    bases = c(A = "#44CC44", C = "#4444CC", G = "#FFCC00", T = "#CC4444"),
    maxRange = 500, cex.lab = 1, alphaOrder = 3, alphaMin = 0.1, fg = "#000000", ...)

Arguments

slice

An integer matrix of read counts, with nucleotides in rows and positions in columns. Both dimensions must be named.

start

Single integer value, the left boundary of the window, in base pairs.

end

Single integer value, the right boundary of the window, in base pairs.

ylim

See plot.default. NA will compute a dynamic ylim fiting the data.

bty

A character string which determined the type of box which is drawn about plots. If bty is one of "o" (the default), "l", "7", "c", "u", or "]" the resulting box resembles the corresponding upper case letter. A value of "n" suppresses the box. See par.

label

Single logical value, whether to print nucleotide on bars or not.

labelCex

Single numeric value, character expansion factor for labels.

bases

Named character vector, defining the color to use for each nucleotide.

maxRange

Single integer value, nothing will be ploted if the plot window is wider by this value (in bases).

cex.lab

The relative character size of x and y axis labels (default: 1). See par.

alphaOrder

Single numeric value, the order of the formula controlling the transparency. Increase this value to increase sensitivity to rare variants.

alphaMin

Single numeric value, the minimal intensity in the formula controlling the transparency (between 0 and 1). Perfectly homozyguous positions will typically use this intensity of color.

fg

Single character value, defining the color of the foreground (axes, labels...) as an english name or a hexadecimal code. Similar to par's argument but not relying on it.

...

Further arguments to be passed to draw.bg.

Author(s)

Sylvain Mareschal

See Also

track.bam-class

draw.bg, draw.boxes, draw.density, draw.hist, draw.points, draw.seq, draw.steps


Rgb documentation built on Aug. 18, 2023, 5:05 p.m.