def pairwise(args):
    from itertools import combinations

    p = OptionParser(pairwise.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    idsfile, = args
    ids = SetFile(idsfile)
    ids = sorted(ids)
    fw = open(idsfile + ".pairs", "w")
    for a, b in combinations(ids, 2):
        print >> fw, "\t".join((a, b))
    fw.close()
%prog gb gffile fastafile
dataset/ETHPy150Open tanghaibao/jcvi/formats/base.py/pairwise--crossover with--dataset/ETHPy150Open tanghaibao/jcvi/formats/gff.py/gb