Learn R Programming

haplotypes (version 1.1.3.1)

image-methods: Display DNA Sequence

Description

Display an image of DNA sequences .

Usage

# S4 method for Dna
image(x,all=FALSE,fifth=TRUE,
col=c("#BFBFBF","#0B99FD","#FD0B0B","#11A808","#F5FD0B","#F8F8FF"),
chars=TRUE,cex=1,show.names=TRUE,show.sites=TRUE,xlab="",ylab="",...)

Arguments

x

an object of class Dna.

all

boolean; should entire sequence be displayed or only the polymorphic sites?

fifth

boolean; if all==FALSE, should gaps be displayed?

col

an integer or character vector for the colors. By default it is blue for "A", red for "C", green for "G", yellow for "T", white for "-", and grey for "?".

chars

boolean; should characters be displayed on image?

cex

a numeric vector of expansion factor for characters.

show.names

boolean; should sequence names be displayed on the left side.

show.sites

boolean; should site labels be displayed on the bottom side.

xlab

a title for the x axis.

ylab

a title for the y axis.

...

additional arguments to image.default.

Methods

signature(x = "Dna")

Display an image of Dna objects

Author

Caner Aktas, caktas.aca@gmail.com.

See Also

Examples

Run this code
data("dna.obj")
x<-dna.obj

## Display only polymorphic sites without gaps
image(x,all=FALSE,fifth=FALSE,show.names=TRUE,cex=0.6)

## Display only polymorphic sites with gaps
image(x,all=FALSE,fifth=TRUE,show.names=TRUE,cex=0.6)

if (FALSE) {
## Display entire sequences
image(x,all=FALSE,show.names=TRUE,cex=0.6)
}

Run the code above in your browser using DataLab