Retrieve gVCF blocks within our current evaluation region.

    gvcfgenotyper does not support calling larger regions with individual
    coverage blocks, so we split our big region into potentially multiple.

def _find_gvcf_blocks(vcf_file, region, tmp_dir):
    """Retrieve gVCF blocks within our current evaluation region.

    gvcfgenotyper does not support calling larger regions with individual
    coverage blocks, so we split our big region into potentially multiple.
    """
    region_file = os.path.join(tmp_dir, "cur_region.bed")
    with open(region_file, "w") as out_handle:
        chrom, coords = region.split(":")
        start, end = coords.split("-")
        out_handle.write("\t".join([chrom, start, end]) + "\n")
    final_file = os.path.join(tmp_dir, "split_regions.bed")
    cmd = "gvcf_regions.py {vcf_file} | bedtools intersect -a - -b {region_file} > {final_file}"
    do.run(cmd.format(**locals()))
    regions = []
    with open(final_file) as in_handle:
        for line in in_handle:
            chrom, start, end = line.strip().split("\t")
            regions.append("%s:%s-%s" % (chrom, start, end))
    return regions