[Biopython-dev] [Biopython - Bug #3349] (New) Bio.PDB.Entity.copy child handling errors.

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri May 4 19:33:54 UTC 2012

Issue #3349 has been reported by Alexander Ford.

Bug #3349: Bio.PDB.Entity.copy child handling errors.

Author: Alexander Ford
Status: New
Priority: Normal
Target version: 
URL: https://github.com/asford/biopython/tree/entity_copy_fix

The Bio.PDB.Entity.copy function, introduced in revision 0d8299a9, does not properly handle the entity child list. Iteration over the child_dict results in a loss of child ordering and the explicit call to detach_child results in a destructive modification of the copied entity's child elements' parent reference.

The copy function should instead instantiate empty child_list and child_dict elements in the copy object and then add copies of each element in the source object's child_list via the Entity.add function. This will appropriately update the copy's child_dict and the child's parent reference while preserving child ordering.

You have received this notification because this email was added to the New Issue Alert plugin

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org

More information about the Biopython-dev mailing list