def freebayes(args):
    p = OptionParser(freebayes.__doc__)
    p.add_option("--mindepth", default=3, type="int",
                 help="Minimum depth [default: %default]")
    p.add_option("--minqual", default=20, type="int",
                 help="Minimum quality [default: %default]")
    opts, args = p.parse_args(args)

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

    prefix, ref = args[0:2]
    bams = args[2:]
    cmd = "bamaddrg -R {0}"
    cmd += " " + " ".join("-b {0}".format(x) for x in bams)
    fmd = "freebayes --stdin -C {0} -f {1}".format(opts.mindepth, ref)
    seqids = list(Fasta(ref).iterkeys_ordered())
    for s in seqids:
        outfile = prefix + ".{0}.vcf".format(s)
        print cmd.format(s), "|", fmd + " -r {0} -v {1}".format(s, outfile)
Creates and returns a dictionary from the given `key_value_pairs`.
dataset/ETHPy150Open tanghaibao/jcvi/variation/snp.py/freebayes--crossover with--dataset/ETHPy150Open shellderp/sublime-robot-plugin/lib/robot/libraries/Collections.py/_Dictionary.create_dictionary