a {seqinr} | 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: Stp, Ala, Cys, Asp, Glu, Phe, Gly, His, Ile, Lys, Leu, Met, Asn, Pro, Gln, Arg, Ser, Thr, Val, Trp, Tyr.
All other values will generate a warning and return NA.
A vector of single characters. Character values are *ACDEFGHIKLMNPQRSTVWY.
D. Charif
The IUPAC one-letter code for aminoacids is described at:
http://www.chem.qmul.ac.uk/iupac/AminoAcid/
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.
# show all allowed values allowed <- c("Stp", "Ala", "Cys", "Asp", "Glu", "Phe", "Gly", "His", "Ile", "Lys", "Leu", "Met", "Asn", "Pro", "Gln", "Arg", "Ser", "Thr", "Val", "Trp", "Tyr") a(allowed) # show what's happen with non-allowed values a("SOS") # should be NA and a warning is generated