Learn R Programming

microseq (version 1.3)

translate: 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 = 1)

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 (ATG, GTG or TTG).

no.stop

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

trans.tab

Translation table, either 1 or 4

Value

A character vector of translated sequences.

Details

Translating DNA or RNA to protein. Possible start codons are ATG, GTG or TTG. Stop codons are TAA, TGA, TAG. All codons are translated accoring to the Stadard geneti code. This is translation table 1. 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 is translated to W (Tryptophan).

Examples

Run this code
# NOT RUN {
ex.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.fasta")
fdta <- readFasta(ex.file)
translate(fdta$Sequence)

# }

Run the code above in your browser using DataLab