Learn R Programming

coil (version 1.2.4)

censored_translation: Censored Translation of a DNA string.

Description

Translate a DNA sequence using the censored translation table. This translates codons for which the amino acids are unambiguous across mitochondrial genetic codes across the animal kingdom and does not translate those for which the amino acid varies, but rather outputs a ? in the string.

Usage

censored_translation(dna_str, reading_frame = 1)

Arguments

dna_str

The DNA string to be translated.

reading_frame

Set the reading frame of the sequence. reading_frame = 1 (default) means the first bp in the string is the start of the first codon, can pass: 1, 2, or 3. i.e. reading_frame = 2 indicates that the second bp in the string is the start of the first codon.

Examples

Run this code
#translate a string of DNA:
censored_translation(example_nt_string)
#manually override the reading frame:
censored_translation(example_nt_string, reading_frame = 2)

Run the code above in your browser using DataLab