WOLFRAM

translates a DNA or RNA sequence bioseq to a peptide sequence.

BioSequenceTranslate[bioseq,gtt]

uses the genetic translation table gtt.

BioSequenceTranslate[bioseq,gtt,startspec]

treats start codons in bioseq according to the specification startspec.

Details

  • The genetic translation table gtt can be specified as follows:
  • Automaticthe standard code (default)
    "name"standard name of a "GeneticTranslationTable" entity
    Entity["GeneticTranslationTable",]"GeneticTranslationTable" entity
    nNCBI genetic code number
    "AAAA"length-64 NCBI codon translation string
    <|"cod1""tran1","cod2""tran2",|>explicit codon translation table
  • The start codon specification startspec specifies what translation should be used for the first codon in bioseq. If no startspec is given, the first codon will be treated as a start codon only if bioseq can be identified as corresponding to a complete protein.
  • The following forms for startspec can be used to specific how to treat the first codon in bioseq:
  • Automatictreat as start codon only for complete proteins
    Falsenever treat as start codon
    Truealways treat as start code
  • The following additional forms for startspec can be used to define start codon behavior, overriding the specification implied by the genetic translation table gtt:
  • nuse NCBI genetic code number start codon specification
    "AAAA"use length-64 NCBI start codon translation string
    <|"cod1""tran1","cod2""tran2",|>explicit specify start codon translations

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Translate a DNA sequence into the corresponding peptide sequences:

Out[1]=1

Scope  (8)Survey of the scope of standard use cases

Translate an RNA sequence:

Out[1]=1

Translate using a "GeneticTranslationTable" entity:

Out[1]=1

Translate using the table corresponding to a NCBI genetic code number:

Out[1]=1

Use an Association to specify the translation table:

Out[1]=1

Use an arbitrary NCBI translation table:

Out[1]=1

Use the start translation of the automatically selected translation table:

Out[1]=1

Specify start codon translations with an association of the changed start codons:

Out[1]=1

Use NCBI notation to specify the start codon translation:

Out[1]=1

Applications  (2)Sample problems that can be solved with this function

The translations to selenocysteine (U) and pyrrolysine (O) only happen in particular chemical contexts that are distinct from the translation system for a particular organism. One way to incorporate them is to change the codon translation association:

Out[1]=1

After splicing together coding sequences, translation yields the same sequence as the protein:

Out[1]=1
Out[2]=2
Out[3]=3

Possible Issues  (2)Common pitfalls and unexpected behavior

Inputs with degenerate letters may have multiple possible translations with no single generalization:

Out[1]=1

Using BioSequenceInstances first will avoid ambiguous results:

Out[2]=2

If the length of a DNA or RNA sequence is not a multiple of three, then the remaining letters after constructing codons are discarded from the end of the sequence:

Out[1]=1

Neat Examples  (2)Surprising or curious use cases

See the peptides resulting from translation:

Out[1]=1

Reveal a phrase encoded in DNA:

Out[1]=1
Wolfram Research (2020), BioSequenceTranslate, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.
Wolfram Research (2020), BioSequenceTranslate, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.

Text

Wolfram Research (2020), BioSequenceTranslate, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.

Wolfram Research (2020), BioSequenceTranslate, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.

CMS

Wolfram Language. 2020. "BioSequenceTranslate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.

Wolfram Language. 2020. "BioSequenceTranslate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BioSequenceTranslate.html.

APA

Wolfram Language. (2020). BioSequenceTranslate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BioSequenceTranslate.html

Wolfram Language. (2020). BioSequenceTranslate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BioSequenceTranslate.html

BibTeX

@misc{reference.wolfram_2025_biosequencetranslate, author="Wolfram Research", title="{BioSequenceTranslate}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/BioSequenceTranslate.html}", note=[Accessed: 28-April-2025 ]}

@misc{reference.wolfram_2025_biosequencetranslate, author="Wolfram Research", title="{BioSequenceTranslate}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/BioSequenceTranslate.html}", note=[Accessed: 28-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_biosequencetranslate, organization={Wolfram Research}, title={BioSequenceTranslate}, year={2020}, url={https://reference.wolfram.com/language/ref/BioSequenceTranslate.html}, note=[Accessed: 28-April-2025 ]}

@online{reference.wolfram_2025_biosequencetranslate, organization={Wolfram Research}, title={BioSequenceTranslate}, year={2020}, url={https://reference.wolfram.com/language/ref/BioSequenceTranslate.html}, note=[Accessed: 28-April-2025 ]}