a | R Documentation |
This is a vectorized function to convert three-letters amino-acid code into the one-letter one, for instance "Ala" into "A".
a(aa)
aa |
A vector of string. All strings are 3 chars long. |
Allowed character values for aa
are given by aaa()
.
All other values will generate a warning and return NA.
Called without arguments, a()
returns the list of all possible
output values.
A vector of single characters.
D. Charif, J.R. Lobry
The IUPAC one-letter code for aminoacids is described at:
https://www.bioinformatics.org/sms/iupac.html
citation("seqinr")
aaa
, translate
#
# Show all possible input values:
#
aaa()
#
# Convert them in one letter-code:
#
a(aaa())
#
# Check consistency of results:
#
stopifnot( aaa(a(aaa())) == aaa())
#
# Show what happens with non-allowed values:
#
a("SOS") # should be NA and a warning is generated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.