@classmethod
def create_from_region(cls, chrom, start, end, strand, binsize, stepsize,
    flank=0, zero_padding=True):
    """Creates a GenomicIndexer object.

        This method constructs a GenomicIndexer from
        a given genomic interval.

        Parameters
        ----------
        chrom : str
            Chromosome name.
        start : int
            Interval start
        end : int
            Interval end
        binsize : int or None
            Binsize in base pairs. If None, the binsize is obtained from
            the interval lengths in the bed file, which requires intervals
            to be of equal length.
        stepsize : int or None
            Stepsize in base pairs. If stepsize is None,
            stepsize is set to equal to binsize.
        flank : int
            flank size in bp to be attached to
            both ends of a region. Default: 0.
        zero_padding : boolean
            zero_padding indicate if variable sequence
            lengths are used in conjunction with zero-padding.
            If zero_padding is True, a binsize must be specified.
            Default: True.
        """
    if binsize is None:
        binsize = end - start
    if stepsize is None:
        stepsize = binsize
    gind = cls(binsize, stepsize, flank, zero_padding=zero_padding)
    gind.add_interval(chrom, start, end, strand)
    return gind
