def fix_chrom(parts):
    MAX_CHROMOSOMES = 50
    if parts[0] in [str(x) for x in range(1, MAX_CHROMOSOMES)] + ["X", "Y"]:
        new_chrom = "chr%s" % parts[0]
    elif parts[0] == "MT":
        new_chrom = "chrM"
    else:
        raise NotImplementedError(parts)
    parts[0] = new_chrom
    return parts
dataset/ETHPy150Open chapmanb/cloudbiolinux/utils/prepare_dbsnp.py/fix_chrom/original