def pool(args):
    """
    %prog pool fastafiles > pool.fasta

    Pool a bunch of FASTA files, and add prefix to each record based on
    filenames. File names are simplified to longest unique prefix to avoid
    collisions after getting shortened.
    """
    from jcvi.formats.base import longest_unique_prefix

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

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

    for fastafile in args:
        pf = longest_unique_prefix(fastafile, args)
        print >> sys.stderr, fastafile, "=>", pf
        prefixopt = "--prefix={0}_".format(pf)
        format([fastafile, "stdout", prefixopt])
dataset/ETHPy150Open tanghaibao/jcvi/formats/fasta.py/pool/swapped operands of `<`