def collect(infile, with_headers=False):
    """read input table."""

    data = []

    lines = filter(lambda x: x[0] != "#", infile.readlines())

    if len(lines) == 0:
        return data

    if with_headers:
        del lines[0]

    for line in lines:
        if line[0] == "#":
            continue

        try:
            (code, goid, scount, stotal, spercent, bcount, btotal, bpercent, pover,
             punder, goid, category, description) = line[:-1].split("\t")[:13]
        except ValueError:
            raise line[:-1] % "# parsing error in line: %s"
            sys.exit(1)

        if code == "+":
            p = pover
        else:
            p = punder

        data.append((100.0 * (float(spercent) / float(bpercent) - 1.0),
                     abs(float(p)), float(bpercent), description))

    return data
dataset/ETHPy150Open CGATOxford/cgat/scripts/go2plot.py/collect/swapped operands of `%`