<p>This is your nuc seq as a fasta:</p>
<pre><code>&gt;sequence_1
TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC
</code></pre>
<p>To translate it use an online tool (ie <a href="https://web.expasy.org/translate/" rel="nofollow noreferrer">https://web.expasy.org/translate/</a>) or do it in biopython:</p>
<pre><code>from Bio import SeqIO
for record in SeqIO.parse(&quot;/path/seq1.fa&quot;, &quot;fasta&quot;):
    print ('nuc', record, sep='\n')
    print ('prot', record.translate(), sep='\n')
</code></pre>
<p>Which gives:</p>
<pre><code>nuc
ID: sequence_1
Name: sequence_1
Description: sequence_1
Number of features: 0
Seq('TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC', SingleLetterAlphabet())
prot
ID: &lt;unknown id&gt;
Name: &lt;unknown name&gt;
Description: &lt;unknown description&gt;
Number of features: 0
Seq('LKHWMNEKPCFATPQ', ExtendedIUPACProtein())
</code></pre>
<p>Note, this defaults to the human codon table. Other codon tables are available with the parameter 'table'.</p>

CC BY-SA 4.0
2021-02-03T21:10:33.460Z
2021-02-03T21:10:33.460Z
Liam McIntyre
<p>TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC this is the DNA code Sequence. I have tried converting each into the amino acid and ended up with this LKHWMNEKPCFATPQX but I was told that this isn't right.</p>

CC BY-SA 4.0
2021-02-03T18:18:02.227Z
So you googled what fasta format looks like for DNA, and you concluded from what you read that it meant to translate the DNA into protein?
swbarnes2
CC BY-SA 4.0
2021-02-03T19:25:00.587Z
FASTA is a sequence format, and it is used for any sequence, including DNA and protein sequence. Translating DNA to protein sequence does not require FASTA or any format, for that matter - the sequence itself is enough. Please clarify your question.
Timur Shtatland
<phylogenetics><fasta><sequence-analysis>
Does anyone know how I can convert DNA code into FASTA for this TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC
# Does anyone know how I can convert DNA code into FASTA for this TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC

(Asked by: username_0 on 2021-02-03)

TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC this is the DNA code Sequence. I have tried converting each into the amino acid and ended up with this LKHWMNEKPCFATPQX but I was told that this isn't right.

**Tags:** phylogenetics, fasta, sequence-analysis
> **Comments:**
> **username_1**: So you googled what fasta format looks like for DNA, and you concluded from what you read that it meant to translate the DNA into protein?  
> **username_2**: FASTA is a sequence format, and it is used for any sequence, including DNA and protein sequence. Translating DNA to protein sequence does not require FASTA or any format, for that matter - the sequence itself is enough. Please clarify your question.  

---

## 1 answers

### Answer by username_3 on 2021-02-03. Score: 1

This is your nuc seq as a fasta:
>sequence_1
TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC

To translate it use an online tool (ie https://web.expasy.org/translate/) or do it in biopython:
from Bio import SeqIO
for record in SeqIO.parse("/path/seq1.fa", "fasta"):
    print ('nuc', record, sep='\n')
    print ('prot', record.translate(), sep='\n')

Which gives:
nuc
ID: sequence_1
Name: sequence_1
Description: sequence_1
Number of features: 0
Seq('TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC', SingleLetterAlphabet())
prot
ID: 
Name: 
Description: 
Number of features: 0
Seq('LKHWMNEKPCFATPQ', ExtendedIUPACProtein())

Note, this defaults to the human codon table. Other codon tables are available with the parameter 'table'.


---

