[Bioperl-l] pdb.pm bug in atom/residue recognition

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Wed Jul 30 07:12:50 EDT 2003


Hello,

I was just browsing this code and think I have found a bug.
(# $Id: pdb.pm,v 1.9 2002/10/22 07:38:44 lapp Exp $ #)

In sub _read_PDB_coordinate_section there is a section of code that 
determines whether the atom is part of a new residue:

1202   my $res_name_num = $resname."-".$resseq;
1203   if ($res_name_num ne $residue_name) { # new residue

It tries to establish uniqueness from the combination of the residue 
name and the sequence number, but this won't work if two conditions occur:
(1) there are two adjacent residues of the same type (so $resname does 
not change from one residue to the next)
(2) there are insertion codes on the sequence numbers (so $resseq does 
not change from one residue to the next).

I believe the correct definition of $res_name_num is:

1202   my $res_name_num = $resname."-".$resseq.$icode;

The insertion code needs to be used every time the sequence number is 
used. A sequence number alone is not a unique identifier, the 
combination is.

Cheers, Dave
-- 
Dave Howorth
MRC Centre for Protein Engineering
Hills Road, Cambridge, CB2 2QH
01223 252960



More information about the Bioperl-l mailing list