Wolfram Research

Function Repository Resource:

DNAtoAminoAcid (1.0.0) current version: 1.0.1 »

Source Notebook

Convert a given strand of DNA to a list of amino acids

Contributed by: Samikshaa Natarajan  |  Samikshaa Natarajan

ResourceFunction["DNAtoAminoAcid"][dna]

converts the input DNA string to a list of amino acid entities.

Details

ResourceFunction["DNAtoAminoAcid"] transcribes and translates an input strand of DNA (assumed to be the coding strand).
It uses the same process that occurs in the process of transcription and translation in living cells.
The input DNA strand must be a string comprised of the characters "A/C/T/G" in upper or lower case.
If the input DNA strand does not have a "TAC" at some location, the function will return "No amino acid chain" due to the lack of methionine as a start codon.
If the input DNA strand contains letters other than "A/C/T/G", then the function will return "Incorrect input".
The output for a valid input string is a list of amino acid Entity objects.

Examples

Basic Examples (1) 

Convert the DNA strand “TACTTTTCGTCCGGTATAATT" to a list of amino acids:

In[1]:=
ResourceFunction["DNAtoAminoAcid"]["TACTTTTCGTCCGGTATAATT"]
Out[1]=

Possible Issues (2) 

Convert an invalid DNA strand with letters other than A/C/T/G:

In[2]:=
ResourceFunction["DNAtoAminoAcid"]["JAUONSHATDJS"]
Out[2]=

Convert a DNA strand without a "TAC" present:

In[3]:=
ResourceFunction["DNAtoAminoAcid"]["AGGGAAATCGATATCGAT"]
Out[3]=

Neat Examples (1) 

Create a visualization of the chain of amino acids by combining this with BioSequenceMoleculePlot:

In[4]:=
ResourceFunction["BioSequenceMoleculePlot"][
 BioSequence["Peptide", ResourceFunction["DNAtoAminoAcid"][
   "GTATACTGGTCATAGCATTGACTGGTCCATGTACTTACCGCT"]]]
Out[4]=

Version History

  • 1.0.1 – 05 July 2022
  • 1.0.0 – 17 June 2022

Related Resources

License Information