TL;DR
This paper introduces a significantly faster algorithm for hierarchical clustering of genomic data, specifically designed for large chromosomes. By assuming that similarity drops off with physical distance, they achieve near-linear time complexity, making previously intractable analyses feasible on standard hardware.
What Problem Does This Paper Address?
Genomic data, like that from Genome-Wide Association Studies (GWAS) or Hi-C experiments, often involves analyzing millions of data points (loci) along chromosomes. A common task is to partition these chromosomes into biologically meaningful regions. Hierarchical Agglomerative Clustering (HAC) is a natural approach, but a modified version that only merges adjacent clusters (respecting the linear order of loci) is more biologically relevant. However, the standard implementation of this adjacency-constrained HAC has a quadratic time and space complexity, making it too slow for the massive datasets generated by modern genomics.
Methods
The core innovation is an adjacency-constrained HAC algorithm that achieves quasi-linear time complexity. This is accomplished by:
- Band Similarity Assumption: The key assumption is that the similarity between loci decreases rapidly with their physical distance. Specifically, they assume the similarity matrix is a "band matrix," meaning similarities are zero for loci separated by more than a certain distance h.
- Pencil Trick: To efficiently compute the necessary similarity sums (required by Ward's linkage criterion) within this band assumption, they introduce a "pencil trick." This involves pre-calculating sums in specific "pencil-shaped" regions of the similarity matrix, allowing for constant-time linkage calculations.
- Min-Heap for Fusions: Candidate fusions (potential merges of clusters) are stored and managed in a min-heap data structure. This allows for efficient retrieval of the best fusion at each step and efficient updates as clusters merge.
Datasets
The methods were evaluated on:
- GWAS Data: A real-world dataset from a GWA study on HIV, using five different chromosomes with varying numbers of SNPs (from ~5,400 to ~23,300).
- Hi-C Data: Data from experiments on mouse embryonic stem cells (mESC), human ESC (hESC), mouse cortex (mCortex), and human IMR90 Fibroblast (hIMR90). This data represents intra-chromosomal interactions.
Key Insights and Ideas
- The "Band" Assumption is Powerful: The assumption that similarity drops off with distance isn't just a computational trick; it reflects biological reality and allows for massive speedups without sacrificing much accuracy.
- Efficiency for Genomics: The proposed algorithm is orders of magnitude faster than existing methods, enabling analysis of entire chromosomes on a standard laptop in minutes or seconds, a feat previously impossible.
- Biologically Meaningful Clusters: The method successfully identifies biologically relevant structures, such as Topological Domains (TADs) in Hi-C data and linkage disequilibrium blocks in GWAS.
Key Results
- Speedup: For a chromosome with ~23,000 SNPs, the new
adjclustpackage ran in ~20 seconds with a bandwidth h=1000, compared to over 5 hours for the existingriojapackage. Even with h=p (no band approximation),adjclustwas significantly faster. - Accuracy: The quality of the dendrograms produced by the band approximation (with h much smaller than p) was very high, often identical or extremely close to the results obtained with the full matrix (h=p). This suggests the speedup comes with minimal loss of information.
- Biological Relevance: The clustering results on GWAS and Hi-C data were shown to highlight biologically meaningful signals, aligning with known structures like TADs and insulator binding sites.
Limitations and Future Work
- Bandwidth Parameter (h): The primary tuning parameter is h, the bandwidth of the similarity band. While experiments suggest a range of h values yield similar results, a data-driven method for choosing h is suggested as future work.
- Exploratory Analysis: While the method is excellent for exploratory data analysis, the authors suggest future work on using its efficiency for more rigorous inference on the estimated hierarchy, potentially using stability or resampling-based methods.
Summary updated