def meryl(args):
    '\n    %prog meryl folder\n\n    Run meryl on Illumina reads.\n    '
    p = OptionParser(meryl.__doc__)
    p.add_option('-k', default=19, type='int', help='Kmer size')
    p.set_cpus()
    (opts, args) = p.parse_args(args)
    if (len(args) != 1):
        sys.exit((not p.print_help()))
    (folder,) = args
    K = opts.k
    cpus = opts.cpus
    mm = MakeManager()
    for (p, pf) in iter_project(folder):
        cmds = []
        mss = []
        for (i, ip) in enumerate(p):
            ms = '{}{}.ms{}'.format(pf, (i + 1), K)
            mss.append(ms)
            cmd = 'meryl -B -C -m {} -threads {}'.format(K, cpus)
            cmd += ' -s {} -o {}'.format(ip, ms)
            cmds.append(cmd)
        (ams, bms) = mss
        pms = '{}.ms{}'.format(pf, K)
        cmd = 'meryl -M add -s {} -s {} -o {}'.format(ams, bms, pms)
        cmds.append(cmd)
        cmd = 'rm -f {}.mcdat {}.mcidx {}.mcdat {}.mcidx'.format(ams, ams, bms, bms)
        cmds.append(cmd)
        mm.add(p, (pms + '.mcdat'), cmds)
    mm.write()
%prog meryl folder

Run meryl on Illumina reads.
def meryl(args):
    '\n    %prog meryl folder\n\n    Run meryl on Illumina reads.\n    '
    p = OptionParser(meryl.__doc__)
    p.add_option('-k', default=19, type='int', help='Kmer size')
    p.set_cpus()
    (opts, args) = p.parse_args(args)
    if (len(args) != 1):
        sys.exit((not p.print_help()))
    (folder,) = args
    K = opts.k
    cpus = opts.cpus
    mm = MakeManager()
    for (p, pf) in iter_project(folder):
        cmds = []
        mss = []
        for (i, ip) in enumerate(p):
            ms = '{}{}.ms{}'.format(pf, (i + 1), K)
            mss.append(ms)
            cmd = 'meryl -B -C -m {} -threads {}'.format(K, cpus)
            cmd += ' -s {} -o {}'.format(ip, ms)
            cmds.append(cmd)
        (ams, bms) = mss
        pms = '{}.ms{}'.format(pf, K)
        cmd = 'meryl -M add -s {} -s {} -o {}'.format(ams, bms, pms)
        cmds.append(cmd)
        cmd = 'rm -f {}.mcdat {}.mcidx {}.mcdat {}.mcidx'.format(ams, ams, bms, bms)
        cmds.append(cmd)
        mm.add(p, (pms + '.mcdat'), cmds)
    mm.write()