def makecolheader(input, annlist, title=""):
    print "/Times-Roman findfont ", colsize, " scalefont setfont"
    for i in range(len(input)):
        print posx(i), posy(-1), " moveto gsave ", textangle, " rotate"
        print "(", input[i], ") show grestore"
    print "/Times-Roman findfont [", rowwidth, "0 0", rowheight, "0 0] makefont setfont"

    if title:
        print "gsave ", 10, posy(-8), "moveto ( %s ) show grestore" % (title)

    for i in range(len(annlist)):
        print "gsave 0 ", posy(i), " translate"
        print "newpath -5 -5 moveto ", annsize - 5, 0, "lineto",
        print annsize - 5, 5 + rowheight, "lineto", 0, 5 + rowheight, "lineto"
        print "closepath clip (", annlist[i], ") 0 0 moveto show grestore"
        # helper lines
        if (0 > greylines and (i + 1) % greylines == 0) or \
           (greylines == 0 and i < len(annlist) - 1 and not sameannotation(annlist[i], annlist[i + 1])):
            print "gsave 0.5 setgray"
            print "0.25 setlinewidth"
            print "[0.25 0.25] 0 setdash"
            print 0, posy(i), "moveto"
            print "(", annlist[i], ") stringwidth pop ", annsize, " min 0 rmoveto"
            print posx(len(input)), posy(i), "lineto stroke grestore"
dataset/ETHPy150Open CGATOxford/cgat/scripts/go2plot.py/makecolheader/swapped operands of `>`