def main(org):
    work_dir = "tmp-dbsnp-%s" % org
    if not os.path.exists(work_dir):
        os.makedirs(work_dir)
    conn = ftplib.FTP(FTP, "anonymous", "me@example.com")
    conn.cwd(REMOTES[org])

    os.chdir(work_dir)
    files = []
    def add_files(x):
        if x.endswith("vcf.gz"):
            files.append(get_file(x, REMOTES[org], conn))
    conn.retrlines("NLST", add_files)
    out_file = "%s-dbSNP-%s.vcf" % (org, datetime.datetime.now().strftime("%Y-%m-%d"))
    with open(out_file, "w") as out_handle:
        for i, f in enumerate(karyotype_sort(files)):
            with gzip.open(f) as in_handle:
                for line in in_handle:
                    if line.startswith("#"):
                        if i == 0:
                            out_handle.write(line)
                    else:
                        out_handle.write("\t".join(fix_info(fix_chrom(line.rstrip().split("\t")))) + "\n")
    subprocess.check_call(["bgzip", out_file])
    shutil.move(out_file + ".gz", os.path.join(os.pardir, out_file + ".gz"))
    os.chdir(os.pardir)
    subprocess.check_call(["tabix", "-p", "vcf", out_file + ".gz"])
    shutil.rmtree(work_dir)
dataset/ETHPy150Open chapmanb/cloudbiolinux/utils/prepare_dbsnp.py/main/original