'Use unified function to process same lines of different samples'

def _process_lines(self, files_dict, row, func, avg_update, merge):

    lines = []
    ret = []
    for i in range(len(files_dict)):
        lines.append(files_dict[i][row].split('|'))
    for col in range(len(lines[0])):
        data_list = []
        for i in range(len(lines)):
            tmp = lines[i][col].strip()
            if is_int(tmp):
                data_list.append(int(tmp))
            else:
                data_list.append(float(tmp))
        ret.append(func(data_list))
    if avg_update:
        for i in avg_update.split('|'):
            l = i.split(',')
            ret[int(l[0])] = ('%.2f' % (float(ret[int(l[1])]) / float(ret[int(l[2])])))
    if merge:
        return '|'.join(ret)
    return ret
