Translate DNA/RNA sequences into amino acids
seq_translate(x, code = 1, codon_frame = 1, codon_init = FALSE)
a vector of DNA (bioseq_dna) or RNA (bioseq_rna).
an integer indicating the genetic code to use for translation (default 1 uses the Standard genetic code). See Details.
an integer giving the nucleotide position where to start translation.
a logical indicating whether the first codon is evaluated as a possible codon start and translated to methionine.
An amino acid vector (bioseq_aa
).
Several genetic codes can be used for translation. See genetic-codes to get the list of available genetic codes and their ID number.
Gaps (-) are interpreted as unknown nucleotides (N) but can be
removed prior to the translation with the function seq_remove_gap
.
The function deals with ambiguities on both sides. This means that if ambiguous codons cannot be translated to amino acid, they are translated to the most specific ambiguous amino acids (X in the most extreme case).
Other biological operations:
rev_complement
,
seq_rev_translate()
,
transcription