[Biopython] deleting/detaching residues from a chain
    Jared Adolf-Bryfogle 
    jadolfbr at gmail.com
       
    Thu Aug 29 00:53:22 UTC 2013
    
    
  
Sure, I was thinking it's the res.id list that's passed to the child_dict
to detach it?
Here is the code snippet:
def delete_res_in_old_chain(old_chain, start, end):
    seq_position = 1
    for res in old_chain:
        if not (start <= seq_position <= end):
            id = res.id
            old_chain.detach_child(id)
        if not res.id[0]==' ':
            seq_position+=1
On Wed, Aug 28, 2013 at 8:31 PM, João Rodrigues <anaryin at gmail.com> wrote:
> Hi Jared,
>
> Can you give us an example of the code you are running? child_dict
> *should* be a dictionary, not a list, so there must be something wrong in
> there.
>
> Cheers,
>
> João
>
    
    
More information about the Biopython
mailing list