def summarize(self):
        """Summarize the table in 'whole' row"""
        
        try:
            chroms=self.get_chroms()
            if not chroms: raise ValueError
        except (__HOLE__,ValueError):
            return
                    
        # obtain a summary statistics
        self.init_table('whole')
        array_adder=lambda x,y: [x[i]+y[i] for i in range(0,len(x))]
        for chrom in chroms:
            if chrom!='whole':
                self['whole']['promoter']=array_adder(self['whole']['promoter'],self[chrom]['promoter'])
                self['whole']['bipromoter']=array_adder(self['whole']['bipromoter'],self[chrom]['bipromoter'])
                self['whole']['downstream']=array_adder(self['whole']['downstream'],self[chrom]['downstream'])
                self['whole']['gene']=array_adder(self['whole']['gene'],self[chrom]['gene'])
                self['whole']['rel_loc'][0]=array_adder(self['whole']['rel_loc'][0],self[chrom]['rel_loc'][0])
                self['whole']['rel_loc'][1]=array_adder(self['whole']['rel_loc'][1],self[chrom]['rel_loc'][1])
                self['whole']['rel_loc_cds'][0]=array_adder(self['whole']['rel_loc_cds'][0],self[chrom]['rel_loc_cds'][0])
                self['whole']['rel_loc_cds'][1]=array_adder(self['whole']['rel_loc_cds'][1],self[chrom]['rel_loc_cds'][1])
                self['whole']['roi']+=self[chrom]['roi']
                self['whole']['Ns']+=self[chrom]['Ns']
dataset/ETHPy150Open taoliu/taolib/Assoc/tables.py/Summary.summarize