def run_pyvcf(args):
    """Main program entry point after parsing arguments"""
    # open VCF reader
    reader = vcf.Reader(filename=args.input_vcf)
    # optionally, open VCF writer
    writer = None
    # read through input VCF file, optionally also writing out
    start = time.clock()
    num = 0
    for num, r in enumerate(reader):
        if num % 10000 == 0:
            print(num, "".join(map(str, [r.CHROM, ":", r.POS])), sep="\t", file=sys.stderr)
        if writer:
            writer.write_record(r)
        if args.max_records and num >= args.max_records:
            break
    end = time.clock()
    print("Read {} records in {} seconds".format(num, (end - start)), file=sys.stderr)