spider (version 1.5.0)

seeBarcode: Create illustrative barcodes

Description

This function plots an illustrative barcode consisting of vertical bands in four colours corresponding to the DNA bases adenine (A), cytosine (C), guanine (G) and thiamine (T).

Usage

seeBarcode(seq, col = c("green", "blue", "black", "red"))

Arguments

seq

A single sequence of class `DNAbin'.

col

A character vector of length 4 giving colours to represent A, G, C and T respectively.

Value

Plots an illustrative barcode.

Details

Green, blue, black and red are the standard colours representing A, G, C and T respectively.

Examples

Run this code
# NOT RUN {
graphics::layout(matrix(1:6, ncol=1))
graphics::par(mar=c(0.5, 0, 0.5, 0))
data(woodmouse)
seeBarcode(woodmouse[1,])
seeBarcode(woodmouse[1,], col=c("pink", "orange", "steelblue", "yellow"))
seeBarcode(woodmouse[1,], col=c("black", "white", "white", "black"))
apply(woodmouse[1:3,], MARGIN=1, FUN=seeBarcode)

# }

Run the code above in your browser using DataLab