def make_matepairs(fastafile):
    assert op.exists(fastafile)

    matefile = fastafile.rsplit(".", 1)[0] + ".mates"
    if op.exists(matefile):
        logging.debug("matepairs file `{0}` found".format(matefile))
    else:
        logging.debug("parsing matepairs from `{0}`".format(fastafile))
        matefw = open(matefile, "w")
        it = SeqIO.parse(fastafile, "fasta")
        for fwd, rev in zip(it, it):
            print >> matefw, "{0}\t{1}".format(fwd.id, rev.id)

        matefw.close()

    return matefile
Load Lua script source into cache. This returns the SHA1 of the loaded
dataset/ETHPy150Open tanghaibao/jcvi/assembly/ca.py/make_matepairs--crossover with--dataset/ETHPy150Open deldotdr/txRedis/txredis/client.py/RedisClient.script_load