def read_chrom_sizes(chrom_sizes):
    """Read chrom.sizes file."""
    ret = {}
    f = open(chrom_sizes, "r")
    for line in f:
        ld = line.rstrip().split("\t")
        ret[ld[0]] = int(ld[1])
    f.close()
    return ret