Convert Nucleotide to Amino Acid

Last updated: September 2, 2025

Overview

Translates a DNA/RNA sequence into a protein sequence.

Inputs

  • DNA/RNA sequence

  • Sequence ID

Outputs

  • Protein sequence in a FASTA-like format

Description

The BioPython has a translate function that turns a nucleotide sequence into a protein sequence or vice versa. The sequence inputted is converted into a Seq object (my_protein_seq = Seq(my_protein)) then passed through this function. The function used for nucleotide to DNA is ‘nucleotide_seq.translate’ from the Bio.Seq module. To convert a DNA sequence into a nucleotide, CodonTable is imported from Bio.Data and the function CodonTable.unambiguous_rna_by_id is used.