dotchart.uco | R Documentation |
Draw a Cleveland dot plot for codon usage tables
dotchart.uco(x, numcode = 1, aa3 = TRUE, pt.cex = 0.7, alphabet =
s2c("tcag"), pch = 21, gpch = 20, bg = par("bg"), cex
= 0.7, color = "black", gcolor = "black", lcolor =
grey(0.9), xlim, offset = 0.4, ...)
x |
table of codon usage as computed by |
numcode |
the number of the code to be used by |
aa3 |
logical. If TRUE use the three-letter code for amino- acids. If FALSE use the one-letter code for amino-acids. |
pt.cex |
the character size to be used for points. |
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. |
cex |
the character expansion size passed to |
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 |
offset |
offset in inches of ylab and labels; was hardwired to 0.4 before R 4.0.0 |
... |
graphical parameters can also be specified as arguments |
An invisible list with components:
x |
table of codon usage |
labels |
codon names |
groups |
amino acid factor |
gdata |
sums by amino acid |
ypg |
the y-axis coordinates for amino acids |
ypi |
the y-axis coordinates for codons |
J.R. Lobry
Cleveland, W. S. (1985) The Elements of Graphing Data.
Monterey, CA: Wadsworth.
citation("seqinr")
dotchart
, uco
, aaa
,
translate
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.