translate {microseq}R Documentation

Translation according to the standard genetic code

Description

The translation from DNA(RNA) to amino acid sequence according to the standard genetic code.

Usage

translate(nuc.sequences, M.start = TRUE, no.stop = TRUE, trans.tab = 11)

Arguments

nuc.sequences

Character vector containing the nucleotide sequences.

M.start

A logical indicating if the amino acid sequence should start with M regardless of start codon.

no.stop

A logical indicating if terminal stops (*) should be eliminated from the translated sequence

trans.tab

Translation table, either 11 or 4

Details

Codons are by default translated according to translation table 11, i.e. the possible start codons are ATG, GTG or TTG and stop codons are TAA, TGA and TAG. The only alternative implemented here is translation table 4, which is used by some bacteria (e.g. Mycoplasma, Mesoplasma). If trans.tab is 4, the stop codon TGA istranslated to W (Tryptophan).

Value

A character vector of translated sequences.

Author(s)

Lars Snipen and Kristian Hovde Liland.

Examples

fa.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.ffn")
fa <- readFasta(fa.file)
translate(fa$Sequence)

# Or, make use of dplyr to manipulate tables
readFasta(fa.file) %>%
  mutate(Protein = translate(Sequence)) -> fa.tbl


[Package microseq version 2.1.6 Index]