View source: R/seq_biological_operations.R
seq_translate | R Documentation |
Translate DNA/RNA sequences into amino acids
seq_translate(x, code = 1, codon_frame = 1, codon_init = FALSE)
x |
a vector of DNA (bioseq_dna) or RNA (bioseq_rna). |
code |
an integer indicating the genetic code to use for translation (default 1 uses the Standard genetic code). See Details. |
codon_frame |
an integer giving the nucleotide position where to start translation. |
codon_init |
a logical indicating whether the first codon is evaluated as a possible codon start and translated to methionine. |
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).
An amino acid vector (bioseq_aa
).
Other biological operations:
rev_complement
,
seq_rev_translate()
,
transcription
x <- dna(c("ATGCAGA", "GGR","TTGCCTAGKTGAACC", "AGGNGC", "NNN")) seq_translate(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.