コード例 #1
0
    def __init__(self, id, name='', functional=True, root_dir=None, pdb_file_type='mmtf'):
        Gene.__init__(self, id=id, name=name, functional=functional)

        self.pdb_file_type = pdb_file_type

        # Create directories
        self._root_dir = None
        if root_dir:
            self.root_dir = root_dir

        self.protein = Protein(ident=id, root_dir=self.gene_dir, pdb_file_type=self.pdb_file_type)
コード例 #2
0
 def __json_decode__(self, **attrs):
     Gene.__init__(self, id=attrs['id'])
     for k, v in attrs.items():
         if k not in ['id']:
             setattr(self, k, v)