Statistical enrichment tools are highly useful in biological research. Current approaches to statistical enrichment in ranked or ordered lists are either limited to fixed thresholds or, as in GSEA and GOrilla, are limited to the list’s suffix (prefix). These methods assess the extreme density of 1s on either side of the binary vector. Statistical significance can be assessed using, e.g., variants of the Wilcoxon Rank-Sum Test and the mHG statistic. In this work, we extend the mHG approach to address enrichment within any index interval of the binary vector. We define and partially characterize related distributions under a uniform null model. Our partial characterization yields useful bounds for extreme events. We provide a software tool to the community that implements the method in Python. Finally, we analyze several example use cases and describe the results. We show, for example, that lung cancer differential expression, comparing ADC to other types, is enriched in a region of Chromosome 3. This example illustrates a typical use case for imHG: assessing enriched intervals for any set of genes of interest. We provide a Python implementation, imHG, for finding and reporting enriched genomic intervals with any given list of genes of interest.



