translate {seqinr} | R Documentation

## Translate nucleic acid sequences

### Description

This function translates nucleic acid sequences to the corresponding peptide sequence. It can translate in any of the 3 forward or three reverse sense frames. In the case of reverse sense, the reverse-complement of the sequence is taken. It can translate using the standard (Universal) genetic code and also with a selection of non-standard codes.

### Usage

    translate(seq, frame = 0, sens = "F", numcode = 1)

### Arguments

`seq` | an object of class `seq`.
`frame` | Frame(s) (0,1,2) to translate. By default the frame `0` is used.
`sens` | Sense to translate: `F` for forward sense and `R` for revers sense.
`numcode` | The number of the code to use. By default the standard genetic code is used.

### Details

The following genetic codes are described here. The number preceding each code corresponds to `numcode`.

1
  standard
2
  vertebrate.mitochondrial
3
  yeast.mitochondrial
4
  protozoan.mitochondrial+mycoplasma
5
  invertebrate.mitochondrial
6
  ciliate+dasycladaceal
9
  echinoderm+flatworm.mitochondrial
10
  euplotid
11
  bacterial+plantplastid
12
  alternativeyeast
13
  ascidian.mitochondrial
14
  alternativeflatworm.mitochondrial
15
  blepharism
16
  chlorophycean.mitochondrial
21
  trematode.mitochondrial
22
  scenedesmus.mitochondrial
23
  hraustochytrium.mitochondria

### Value

`translate` returns a vector of character containing the peptide sequence in the standard one-letter IUPAC code. Termination (STOP) codons are translated as the character '*'.

### Author(s)

D. Charif

### References

The genetic codes have been taken from the ncbi taxonomy database: http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=c . Last update October 05, 2000.
The IUPAC one-letter code for aminoacids is described at: http://www.chem.qmul.ac.uk/iupac/AminoAcid/

`citation("seqinr")`

### See Also

`SEQINR.UTIL`

### Examples

    a=read.fasta(File=system.file("sequences/malM.fasta",package ="seqinr"))
    translate(a[[1]])
    translate(a[[1]],3,"R",6)

[Package seqinr version 1.0-4 Index]