[Biopython-dev] creating Protein(structure) object

João Rodrigues anaryin at gmail.com
Mon Jun 14 17:58:56 UTC 2010


Hello Kristian,

The way I'm doing it as a workaround is:

class Protein(Structure):

    def __init__(self, protein):

        Structure.__init__(self, protein.id)

        self.full_id = protein.full_id
        self.child_list = protein.child_list
        self.child_dict = protein.child_dict
        self.parent = protein.parent
        self.xtra = protein.xtra

It works because every method I'm using deepcopies this anyway..

The way of adding the childs seems the correct way to go but it won't copy
headers... should we want this?

Thanks :)

J



More information about the Biopython-dev mailing list