def sliding_intervals_gen(coordgen, interval_size=1000):
    """
    Generate sliding window coordinate intervals over the entire reference genome provided
    """
    for chr_name, chr_len in coordgen.chr_name_len.items():
        for start in range(0, chr_len, interval_size):
            end = (start + interval_size if start + interval_size <=
                chr_len else chr_len)
            yield coordgen(chr_name, start, end)
