[Biopython-dev] [Bug 2879] missing __delitem__ in Bio.PDB.Entity.Entity

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jul 22 04:17:06 EDT 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2879





------- Comment #2 from katja.luck at unistra.fr  2009-07-22 04:17 EST -------
(In reply to comment #1)
> Could you give a short but complete example showing the problem?
> 
example code:

from Bio.PDB.PDBParser import PDBParser

if '__main__' == __name__:

        parser = PDBParser(PERMISSIVE=1)

        PDBID = '1N7T'
        PDB_file = '/Network/Servers/sumba/Volumes/s/luck/pymol/1N7T.pdb'

        structure = parser.get_structure(PDBID,PDB_file)

        chain = structure[0]['A']
        print chain[66].get_id()
        chain.__delitem__(66)

command line output:

[carlit:/Users/katja] luck% python Python_scripts/PDZ_project/bug_example.py
(' ', 66, ' ')
Traceback (most recent call last):
 File "Python_scripts/PDZ_project/bug_example.py", line 14, in <module>
   chain.__delitem__(66)
 File "/Library/Python/2.5/site-packages/Bio/PDB/Chain.py", line 79, in
__delitem__
   return Entity.__delitem__(self, id)
AttributeError: class Entity has no attribute '__delitem__'

Okay, I now realised that I should rather use detach_child() than the private
method __delitem__() for deleting residues from a chain but still thought it
might be good to report this bug.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list