def region_to_bin(chr_start_bin, bin_size, chr, start):
    """Translate genomic region to Cooler bin idx.

    Parameters:
    ----------
    chr_start_bin : dict
        Dictionary translating chromosome id to bin start index
    bin_size : int
        Size of the bin
    chr : str
        Chromosome
    start : int
        Start of the genomic region
    """
    return chr_start_bin[chr] + start // bin_size
