Sometimes you start from a gene sequence (DNA) and need the protein.
Make a DNA sequence (Figure 1)
Copy/paste into a code cell
Code:
from Bio.Seq import Seq
dna_seq = Seq("ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG")
print("DNA:", dna_seq)
Figure 1: Creation of DNA sequence.
Translation is the process by which the nucleotide sequence of DNA is decoded into an amino-acid sequence, resulting in a functional protein. Translation converts the language of DNA into the language of proteins.
DNA is written using nucleotides (A, T, G, C), while proteins are written using amino acids. Translation is the step that links these two.
Biopython reads DNA in codons (3 bases at a time)
Each codon becomes an amino acid
stop codons become * (Figure 2)
Copy/paste into a code cell
Code:
protein_from_dna = dna_seq.translate()
print("Protein:", protein_from_dna)
Figure 2: Translation DNA to protein.