def _run_gvcfgenotyper(data, region, vrn_files, out_file):
    """Run gvcfgenotyper on a single gVCF region in input file.
    """
    if not utils.file_exists(out_file):
        with file_transaction(data, out_file) as tx_out_file:
            input_file = "%s-inputs.txt" % utils.splitext_plus(tx_out_file)[0]
            with open(input_file, "w") as out_handle:
                out_handle.write("%s\n" % "\n".join(vrn_files))
            cmd = ["gvcfgenotyper", "-f", dd.get_ref_file(data), "-l", input_file,
                   "-r", region, "-O", "z", "-o", tx_out_file]
            do.run(cmd, "gvcfgenotyper: %s %s" % (dd.get_sample_name(data), region))
    return out_file
Run gvcfgenotyper on a single gVCF region in input file.