[Bioperl-l] insertion code in pdb parser
jarodpardon at yahoo.com.cn
Sun Mar 7 04:13:40 EST 2010
insertion code for a residue number is very common in many cases, esp. in the numbering schema for antibody sequence, such as 82A, 82B. When Bio::Structure::IO::pdb parses a pdb file containing residues with insertion code, it will assign the id for such residue like 'PRO-52.A' where 'A' is the insertion code, however, the opposite operation (set the id of the residue) does not work. for example, if the original residue number is 51, $res->id('PRO-52.A') will not append the insertion code after the residue number correctly, though it indeed changes the residue number from 51 to 52. Finally, I found out the only way to set the insertion code for the residue: assign the insertion code for all atoms of this residue by the method $atom->icode('A'). I think it is inconvenient and misleading, since insertion code should not be a property for an atom, it is never seen that a residue have atoms with different insertion codes. I highly recommend that there
should be some changes: add icode method for residue object, not the atom, as the same, the segment id should also be for residue.
More information about the Bioperl-l