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 $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.


  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

  2. Your blog is nice. I believe this will surely help the readers who are really in need of this vital piece of information. Thanks for sharing and kindly keep updating.

    IELTS Coaching in Adyar
    IELTS Class in Thiruvanmiyur
    IELTS Class in Triplicane
    IELTS Coaching in Anna Nagar
    IELTS Coaching Centre in Koyambedu
    IELTS Coaching Centres in Chennai Mogappair
    IELTS Classes near me

  3. 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

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

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

  6. Learn the rules, grasp your technique, and the sport itself, as you might not need to lose some huge cash} whereas still uncertain of means to|tips on how to} play. If you don’t have reserves to wager, then you would possibly as properly not play right now. Before you hit the on line casino flooring, observe how a lot you intend to spend. And whereas at the on line casino, observe your wins and losses guarantee you|to make sure you} keep on target. 토토사이트 Equally essential, the payout share mathematically determines how a lot you would possibly lose.