Function Repository Resource:

DNAtoAminoAcid

Source Notebook

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

Contributed by: 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.
The output for a valid input string is a list of amino acid Entity objects.

Examples

Basic Examples (2) 

Convert a DNA strand to a list of the amino acids comprising the resulting peptide:

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

Use BioSequence to create the representation for the peptide sequence:

In[2]:=
BioSequence["Peptide", %]
Out[2]=

Scope (1) 

Convert a DNA BioSequence directly:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/f6a3f8f1-539d-459d-a868-d32a07dc7840"]
Out[3]=

Possible Issues (2) 

DNAtoAminoAcid fails if the input string contains letters other than A/C/T/G:

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

DNAtoAminoAcid fails if the input string does not contain the starting codon "TAC":

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

Neat Examples (3) 

Generate the peptide corresponding to a DNA sequence:

In[6]:=
pep = BioSequence["Peptide", ResourceFunction["DNAtoAminoAcid"][
   "GTATACTGGTCATAGCATTGACTGGTCCATGTACTTACCGCT"]]
Out[6]=

Use the resource function BioSequenceMoleculePlot to visualize the peptide:

In[7]:=
ResourceFunction["BioSequenceMoleculePlot"][pep]
Out[7]=

Get the name of the peptide:

In[8]:=
ResourceFunction["PeptideName"][pep, "Hyphenate" -> True]
Out[8]=

Publisher

Samikshaa Natarajan

Version History

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

Related Resources

License Information