[Biopython] deleting/detaching residues from a chain

Gmail jadolfbr at gmail.com
Thu Aug 29 00:25:43 UTC 2013


> Hi All,
> 
> I am trying to delete residues from a chain using
> 
>             id = res.id
>             old_chain.detach_child(id)
> 
> Which was talked about here: http://pelican.rsvs.ulaval.ca/mediawiki/index.php/Manipulating_PDB_files_using_BioPython
> 
> I used both the release versions and built the github version, but I get an error message:
> 
>   File "/PyIgClassify/tools/renumbering.py", line 296, in delete_res_in_old_chain
>     old_chain.detach_child(id)
>   File "/Library/Python/2.7/site-packages/Bio/PDB/Entity.py", line 76, in detach_child
>     child=self.child_dict[id]
> TypeError: unhashable type: 'list'
> 
> I have tried this in iPython with arbitrary chains and the result seems to be the same.  
> Any advice for a newbie Biopython coder?  Is this a bug or is there some way around this?
> 
> Thanks!!
> 
> Jared Adolf-Bryfogle
> PhD Candidate
> Lab of Dr. Roland Dunbrack
> FCCC/DrexelMed
> 




More information about the Biopython mailing list