biopython/biopython — pull request #59 by etal (2012-08-23 19:43:38+00:00)
Title: Support 'pdb-seqres' format in SeqIO

This patch set creates a new module under Bio.SeqIO called PdbIO. It currently supports one format, which I called "pdb-seqres". This reads the SEQRES lines from the PDB file and constructs the full protein sequence. Most (all?) PDB records in the current RCSB database have this information listed in the header, so we don't need to worry about how to handle disordered regions, chain breaks, residue numbering, etc.

The parser yields one SeqRecord per chain in the structure. (The PDB format doesn't allow for different SEQRES sequences for multi-chain models... conveniently.) If a PDB file has no SEQRES lines, then nothing is yielded. The unit tests show this behavior.

If this is OK to merge, then I'll work on two more PDB-related formats after this: "pdb-atom", which we discussed earlier but didn't quite get working satisfactorily, and "pdb-ss" for secondary structures, which could have some synergy with our DSSP support but would also probably involve another alphabet type. But that's for later.