ape (version 3.0-11)

image.DNAbin: Plot of DNA Sequence Alignement

Description

This function plots an image of an alignment of nucleotide sequences.

Usage

## S3 method for class 'DNAbin':
image(x, what, col, bg = "white", xlab = "", ylab = "",
      show.labels = TRUE, cex.lab = 1, legend = TRUE, ...)

Arguments

Details

The idea of this function is to allow flexible plotting and colouring of a nucleotide alignment. By default, the most common bases (a, g, c, t, and n) and alignment gap are plotted using a standard colour scheme.

It is possible to plot only one base specified as what with a chosen colour: this might be useful to check, for instance, the distribution of alignment gaps (image(x, "-")) or missing data (see examples).

See Also

DNAbin, del.gaps, alex, clustal, grid

Examples

Run this code
data(woodmouse)
image(woodmouse)
image(woodmouse, "n", "blue") # show missing data
image(woodmouse, c("g", "c"), "green") # G+C
par(mfcol = c(2, 2))
### barcoding style:
for (x in c("a", "g", "c", "t"))
    image(woodmouse, x, "black", cex.lab = 0.5, cex.axis = 0.7)
par(mfcol = c(1, 1))
### zoom on a portion of the data:
image(woodmouse[11:15, 1:50], c("a", "n"), c("blue", "grey"))
grid(50, 5, col = "black")
### see the guanines on a black background:
image(woodmouse, "g", "yellow", "black")

Run the code above in your browser using DataCamp Workspace