a {seqinr} | R Documentation

## 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

`aa` | A vector of string. All strings are 3 chars long.

### Details

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.

### Value

A vector of single characters. Character values are *ACDEFGHIKLMNPQRSTVWY.

### Author(s)

D. Charif

### References

The IUPAC one-letter code for aminoacids is described at: http://www.chem.qmul.ac.uk/iupac/AminoAcid/ `citation("seqinr")`

### See Also

`translate`, `aaa`

### Examples

      # 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

[Package seqinr version 1.0-4 Index]