Biopython Code to Convert DNA FASTA file to Protein FASTA file
1
0
Entering edit mode
2.4 years ago
biology • 0

Hello, I am trying to translate a DNA FASTA file to Protein FASTA file using biopython. I am trying to translate about 5,000 gene extractions, so anything which requires copy and pasting will not work. I need the output as a FASTA file. I have seen previous threads which are similar, but those are outdated and do not work with later versions of Biopython. Please reply with the code on how to do this.

Biopython • 1.7k views
ADD COMMENT
0
Entering edit mode

As Mensur Dlakic mentioned, you need to put some effort to get help.

This is just a sample code:

>>> from Bio.Seq import Seq
>>> coding_dna = Seq("ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG")
>>> coding_dna.translate()
Seq('MAIVMGR*KGAR*')

But, this will not solve your issue, it is just the beginning. Please, follow the documentation here:

http://biopython.org/DIST/docs/tutorial/Tutorial.html

Section 3.8 translation.

Cheers

ADD REPLY
0
Entering edit mode

Note to OP - you'll need to ensure you are using an appropriate translation table.

ADD REPLY
0
Entering edit mode

Try to put some effort on this task. A simple google search will give you the answer

ADD REPLY
1
Entering edit mode
2.4 years ago
Mensur Dlakic ★ 28k

This is not a code-providing service. If you are expecting to lay out your needs and someone will give you a code for it, you are in a wrong place. There are places where you can get what you asked for if you pay.

If you show some effort:

  • what code did you run?
  • what modifications did you make?
  • what were the errors?

Then it will be more likely that someone will help you.

By the way, DNA translation into protein is one of the most trivial transformations in bioinformatics. There are many programs out there, though possibly non-pythonic, that will do that operation. All of this is easy to find by Googling.

ADD COMMENT

Login before adding your answer.

Traffic: 1931 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6