These functions help to create and manipulate AA sequences.
# S3 method for AAbin
print(x, ...)# S3 method for AAbin
[(x, i, j, drop = FALSE)
# S3 method for AAbin
c(..., recursive = FALSE)
# S3 method for AAbin
rbind(...)
# S3 method for AAbin
cbind(..., check.names = TRUE, fill.with.Xs = FALSE,
quiet = FALSE)
# S3 method for AAbin
as.character(x, ...)
# S3 method for AAbin
labels(object, ...)
# S3 method for AAbin
image(x, what, col, bg = "white", xlab = "", ylab = "",
show.labels = TRUE, cex.lab = 1, legend = TRUE, grid = FALSE,
show.aa = FALSE, aa.cex = 1, aa.font = 1, aa.col = "black",...)
as.AAbin(x, ...)
# S3 method for character
as.AAbin(x, ...)
# S3 method for list
as.AAbin(x, ...)
# S3 method for AAString
as.AAbin(x, ...)
# S3 method for AAStringSet
as.AAbin(x, ...)
# S3 method for AAMultipleAlignment
as.AAbin(x, ...)
# S3 method for AAbin
as.list(x, ...)
# S3 method for AAbin
as.matrix(x, ...)
# S3 method for AAbin
as.phyDat(x, ...)
dist.aa(x, pairwise.deletion = FALSE, scaled = FALSE)
AAsubst(x)
an object of class "AAbin"
, "character"
,
"dist"
, or "numeric"
, depending on the function.
an object of class "AAbin"
(or else depending on
the function).
indices of the rows and/or columns to select or to drop. They may be numeric, logical, or character (in the same way than for standard R objects).
logical; if TRUE
, the returned object is of the
lowest possible dimension.
logical; whether to go down lists and concatenate its elements.
a logical specifying whether to check the rownames before binding the columns (see details).
a logical indicating whether to keep all
possible individuals as indicating by the rownames, and eventually
filling the missing data with insertion gaps (ignored if
check.names = FALSE
).
a logical to switch off warning messages when some rows are dropped.
a vector of characters specifying the amino acids to visualize. Currently, the only possible choice is to show the three categories hydrophobic, small, and hydrophilic.
a vector of colours. If missing, this is set to ``red'', ``yellow'' and ``blue''.
the colour used for AA codes not among what
(typically
X and *).
the label for the x-axis; none by default.
Idem for the y-axis. Note that by default, the labels of the sequences are printed on the y-axis (see next option).
a logical controlling whether the sequence labels are
printed (TRUE
by default).
a single numeric controlling the size of the sequence
labels. Use cex.axis
to control the size of the annotations on
the x-axis.
a logical controlling whether the legend is plotted
(TRUE
by default).
a logical controlling whether to draw a grid (FALSE
by
default).
a logical controlling whether to show the AA symbols (FALSE
by
default).
control the aspect of the AA symbols
(ignored if the previous is FALSE
).
a logical indicating whether to delete the sites with missing data in a pairwise way. The default is to delete the sites with at least one missing data for all sequences.
a logical value specifying whether to scale the number of AA differences by the sequence length.
further arguments to be passed to or from other methods.
Emmanuel Paradis, Franz Krah
These functions help to manipulate amino acid sequences of class
"AAbin"
. These objects are stored in vectors, matrices, or lists
which can be manipulated with the usual [
operator.
There is a conversion function to and from characters.
The function dist.aa
computes the number of AA differences
between each pair of sequences in a matrix; this can be scaled by the
sequence length. See the function dist.ml
in
phangorn for evolutionary distances with AA sequences.
The function AAsubst
returns the indices of the polymorphic sites
(similar to seg.sites
for DNA sequences; see examples below).
The two functions cbind.AAbin
and rbind.AAbin
work in the
same way than the similar methods for the class "DNAbin"
: see
cbind.DNAbin
for more explanations about their respective
behaviours.
read.FASTA
, trans
, alview
data(woodmouse)
AA <- trans(woodmouse, 2)
seg.sites(woodmouse)
AAsubst(AA)
Run the code above in your browser using DataLab