seqinr (version 1.0-1)

dotchart.uco: Cleveland plot for codon usage tables

Description

Draw a Cleveland dot plot for codon usage tables

Usage

dotchart.uco(x, numcode = 1, aa3 = TRUE, cex = 0.7, alphabet = s2c("tcag"),
 pch = 21, gpch = 20, bg = par("bg"), color = par("fg"), gcolor = par("fg"),
lcolor = "gray", xlim, ...)

Arguments

x
table of codon usage as computed by uco.
numcode
the number of the code to be used by translate.
aa3
logical. If TRUE use the three-letter code for amino- acids. If FALSE use the one-letter code for amino-acids.
cex
the character size to be used.
alphabet
character for codons labels
pch
the plotting character or symbol to be used.
gpch
the plotting character or symbol to be used for group values.
bg
the background color to be used.
color
the color(s) to be used for points an labels.
gcolor
the single color to be used for group labels and values.
lcolor
the color(s) to be used for the horizontal lines.
xlim
horizontal range for the plot
...
graphical parameters can also be specified as arguments

Value

  • An invisible list with components:
  • xtable of codon usage
  • labelscodon names
  • groupsamino acid factor
  • gdatasums by amino acid
  • ypgthe y-axis coordinates for amino acids
  • ypithe y-axis coordinates for codons

References

Cleveland, W. S. (1985) The Elements of Graphing Data. Monterey, CA: Wadsworth. To have an overview of the seqinR's functionnality, please consult this vignette: Charif, D., Lobry, J.R. (2005) SeqinR: a contributed package to the R project for statistical computing devoted to biological sequences retrieval and analysis. Springer Verlag, Biological and Medical Physics/Biomedical Series, in preparation.

See Also

dotchart, uco, aaa, translate

Examples

Run this code
# Load dataset:
data(ec999)
# Compute codon usage for all coding sequences:
ec999.uco <- lapply(ec999, uco, index="eff") 
# Put it in a dataframe:
df <- as.data.frame(lapply(ec999.uco, as.vector)) 
# Add codon names:
row.names(df) <- names(ec999.uco[[1]])
# Compute global codon usage:
global <- rowSums(df)
# Choose a title for the graph:
title <- "Codon usage in 999 E. coli coding sequences"
# Plot data:
dotchart.uco(global, main = title)

Run the code above in your browser using DataLab