@classmethod
def create_from_genomesize(cls, gsize):
    """Creates a GenomicIndexer object.

        This method constructs a GenomicIndexer from
        a given BED or GFF file.

        Parameters
        ----------
        gsize : dict
            Dictionary with keys and values representing chromosome names
            and lengths, respectively.
        """
    gind = cls(None, None, 0, zero_padding=False, collapse=False)
    for chrom in gsize:
        gind.add_interval(chrom, 0, gsize[chrom], '.')
    return gind
