Saturday, May 26, 2012

Extracting the amino acid sequence from a PDB file with Pymol

So I was just looking for a really quick way to take the sequence information from my PDB file so I could compare it to the real sequence to ensure that I have the correct amino acids in my structure. There are various programs that can do but I just wanted a quick way without having to download a new program or upload my PDB file and wait for a result. Found that  Pymol is able to exactly what I wanted and quickly.

Load your pdb file with Pymol. Then use the following command:

save somename.fasta

Or for a just one chain:

save somename.fasta, chain A

The file is saved in the same folder as your pdb file. Now you can do an alignment (or whatever you need to do with the sequence).

Note: if you have residues which have alternative conformations it's best to remove these alternate conformation. If not, Pymol will add two residues to the sequence file instead of one. To remove alternate confomations in Pymol:

remove not (alt ''+A)
alter all, alt=''

For more info see here.

4 comments: