def toxls(self):
        """To a xls format"""
        
        script=self.get_name() %'# %s\n'
        script+='\t'.join(self.columns)+'\n'
        for chrom in self.get_chroms():

            for i in xrange(len(self.xls[chrom][self.columns[1]])):
                line=[str(self.xls[chrom][column][i]) for column in self.columns[1:]]
                script+= chrom+ '\t' + '\t'.join(line) + '\n'

        return script
dataset/ETHPy150Open taoliu/taolib/Assoc/inout.py/XLS.toxls/swapped operands of `%`