def bgzip_vcf(in_file):
    out_file = in_file + ".gz"
    if not os.path.exists(out_file):
        subprocess.check_call("bgzip -c %s > %s" % (in_file, out_file), shell=True)
    tabix_file = out_file + ".tbi"
    if not os.path.exists(tabix_file):
        subprocess.check_call(["tabix", "-p", "vcf", out_file])
    return out_file
dataset/ETHPy150Open chapmanb/cloudbiolinux/utils/prepare_cosmic.py/bgzip_vcf/original