Pages

Tuesday 2 December 2014

Converting PDB files to FASTA format with python

This is a simple script to convert PDB files (which contain information about protein structure) into FASTA format, which is just a list of the amino acids. This code handles one PDB file at a time, to do multiple ones put it in a loop e.g. for bash:

for i in `ls *.pdb`; do python pdb2fasta.py $i > $i.fasta; done

In operation, it just looks for lines with 'ATOM', then looks at the residue number to see if has changed. When the residue numbers change it outputs the current amino acid label. Feel free to use/modify this code for any purpose.

7 comments:

  1. Excellent admin, I have learned to convert PDB files to FASTA format with python. Share more like this.
    Python Training Institute in Chennai | Best Python Training in Chennai

    ReplyDelete
  2. Your post is really awesome. Your blog is really helpful for me to develop my skills in a right way. Thanks for sharing this unique information with us.
    - Learn Digital Academy

    ReplyDelete
  3. GlassWire Crack is a new application or service accessing the Internet for the first time? GlassWire Elite Crack politely alerts GlassWire Crack

    ReplyDelete
  4. Mega Downloader crack offers user measured scrambled cloud stowing planetary and dialogue as of side to adjacent regular network browsers. Mega Downloader Pc

    ReplyDelete
  5. thanks for giving wonderful information on Converting PDB files to FASTA format, keep posting valuable information Software Testing Training in Pune

    ReplyDelete