Learn R Programming

micropan (version 1.0)

translate: From nucleotides to proteins

Description

Translates nucleotide strings (DNA or RNA) into protein sequences.

Usage

translate(nuc.strings, Mstart=TRUE)

Arguments

nuc.strings
character vector containing nucleotide strings.
Mstart
logical indicating if V and L nucleotides should be changed to M.

Value

Returns a character vector containing the translated amino acid sequences.

Details

Translates nucleotide strings (DNA or RNA) into amino acid sequences using the standard genetic code. A vector of sequences (strings) can be used as input, and a corresponding vector of amino acid strings are returned. Stop codons are translated into *.

Alien characters (not A, C, G, U or T) will be tolerated in the third codon position in those cases where the third character is irrelevant for the translation. In all other cases, a codon containing an alien will be translated into X.

See Also

reverseComplement

Examples

Run this code
dna<-"ATGGGTCTGAACTGCTGGACTAAATGA"
translate(dna)

Run the code above in your browser using DataLab