[Biopython-dev] [Bug 2777] [Solution is one line change!] Entity sorting altered by detach_child() calls

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Mar 4 08:58:41 EST 2009


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





------- Comment #2 from klaus.kopec at tuebingen.mpg.de  2009-03-04 08:58 EST -------
Created an attachment (id=1253)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=1253&action=view)
example PDB file that can be used to see the bug

## Python Code to see the bug:
import os
from Bio.PDB.PDBParser import PDBParser
p=PDBParser(PERMISSIVE=1)
filename=os.path.expanduser("entity_detach_order_bug_example.pdb")
s=p.get_structure('Entity.py bug example: detach changes order', filename)

print 'order before detach:'
for r in s[0]['A'].child_list:
    print r.id

detach_me = s[0]['A'].child_list[-1] ## this is independent of the chosen entry
in the list
s[0]['A'].detach_child(detach_me.id)

print 'order after detach:'
for r in s[0]['A'].child_list:
    print r.id


-- 
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