[BioPython] Extracting residue list from PDB
Gad Abraham
gabraham at cs.rmit.edu.au
Fri Oct 28 10:52:50 EDT 2005
Hi,
I'm trying to extract a FASTA-like list of residues from a PDB file. It
doesn't seem to work correctly for some (e.g. 1n62, which comes out as
10 chains while it only has 6, and chain lengths are wrong too).
I'm using the following script based on the Structural Biopython FAQ:
#!/usr/bin/python
from Bio.PDB import *
import sys
parser = PDBParser()
structure = parser.get_structure(sys.argv[1], sys.argv[1])
ppb = PPBuilder()
for pp in ppb.build_peptides(structure):
print len(pp),pp.get_sequence().tostring()
print
Any tips would be appreciated.
Thanks,
Gad
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gabraham at cs.rmit.edu.au
http://yallara.cs.rmit.edu.au/~gabraham
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the BioPython
mailing list