fjoin: simple and efficient computation of feature overlaps.
Computational-Biology, Pattern-Recognition-Automated, Software
J Comput Biol 2006 Oct; 13(8):1457-64.
Sets of biological features with genome coordinates (e.g., genes and promoters) are a particularly common form of data in bioinformatics today. Accordingly, an increasingly important processing step involves comparing coordinates from large sets of features to find overlapping feature pairs. This paper presents fjoin, an efficient, robust, and simple algorithm for finding these pairs, and a downloadable implementation. For typical bioinformatics feature sets, fjoin requires O(n log(n)) time (O(n) if the inputs are sorted) and uses O(1) space. The reference implementation is a stand-alone Python program; it implements the basic algorithm and a number of useful extensions, which are also discussed in this paper.
Richardson, J E., "fjoin: simple and efficient computation of feature overlaps." (2006). Faculty Research 2000 - 2009. 1437.