Last chance! 50% off unlimited learning
Sale ends in
trans
translates DNA sequences into amino acids.
complement
returns the (reverse) complement sequences.
trans(x, code = 1, codonstart = 1)
complement(x)
an object of class "DNAbin"
(vector, matrix or list).
an integer value giving the genetic code to be used. Currently only 1 (standard code) and 2 (vertebrate mitochondrial code) are supported.
an integer giving where to start the translation. This should be 1, 2, or 3, but larger values are accepted and have for effect to start the translation further within the sequence.
an object of class "AAbin"
or "DNAbin"
, respectively.
With trans
, if the sequence length is not a multiple of three,
a warning message is printed. Alignment gaps are simply ignored (i.e.,
AG-
returns X
with no special warning or message). Base
ambiguities are taken into account where relevant: for instance,
GGN
, GGA
, GGR
, etc, all return G
.
http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/index.cgi?chapter=cgencodes
# NOT RUN {
data(woodmouse)
X <- trans(woodmouse) # not correct
X2 <- trans(woodmouse, 2) # using the correct code
identical(X, X2)
alview(X[1:2, 1:60]) # some codon Stop (*)
alview(X2[, 1:60])
X2
# }
Run the code above in your browser using DataLab