File: a.Rd

package info (click to toggle)
r-cran-seqinr 3.4-5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,876 kB
  • sloc: ansic: 1,987; makefile: 14
file content (55 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
\name{a}
\alias{a}
\title{Converts amino-acid three-letter code into the one-letter one}
\description{
This is a vectorized function to convert three-letters amino-acid code
into the one-letter one, for instance "Ala" into "A".
}
\usage{
a(aa)
}
\arguments{
  \item{aa}{ A vector of string. All strings are 3 chars long.}
}
\details{
Allowed character values for \code{aa} are given by \code{aaa()}.
All other values will generate a warning and return NA.
Called without arguments, \code{a()} returns the list of all possible
output values.
}
\value{
A vector of single characters.
}
\references{
The IUPAC one-letter code for aminoacids is described at: 
\url{http://www.chem.qmul.ac.uk/iupac/AminoAcid/}\cr
\code{citation("seqinr")}
}
\author{D. Charif, J.R. Lobry }
\seealso{\code{\link{aaa}}, \code{\link{translate}} }
\examples{
  #
  # 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
}
\keyword{ utilities }