Fast multi-resolution consensus clustering

Clustering is a key tool for exploring results from large scale data collection efforts. It is especially useful to find clusterings (partitions of data into non-overlapping sets) at different levels of granularity, ranging from detailed to abstract. In order to be consistent such a set of clusterings should be nested, requiring that elements that group together in a given clustering group together in all coarser clusterings. Hierarchical clustering provides a tree for the data and naturally induces nested clusterings, but none of the methods have gained traction to provide such a multi-resolution view. Widely used methods such as Leiden and the Markov Cluster method (MCL) can produce clusterings at different scales controlled by a resolution parameter, but the results are generally not nested. I introduce Restricted Contingency Linkage (RCL), a parameter-free consensus method that uniquely integrates and reconciles a set of flat clusterings with potentially widely varying levels of granularity into a single multi-resolution view. A common starting point in consensus methods is the association matrix A, where Aij tallies the number of co-occurrences of i and j in the same cluster across all clusterings. RCL creates a matrix R where Rij tallies a measure that differentiates i-j pairs with respect to the amount that they co-cluster in pairs of clusterings while taking into account the subset relationship between the clusters involved. The entries in R are fully abstracted from the input data, richly differentiated and uniformly normalised, making it suitable for single linkage clustering. From the resulting tree a limited set of flat clusterings is obtained by varying a resolution criterion along a logarithmic scale. I validate the method using large-scale single-cell transcriptome data from human developing kidneys, along with visualisations and quality control measures of clustering ensembles. Marker gene expression is summarised in a heatmap across the multi-level RCL clusters, providing a coherent view of cell type and cell state hierarchies within the tissue. This reveals clusters corresponding to small populations of mast cells, plasma cells and interstitial cells, and shows segregation of cycling cells in small populations across different cell clades. Given an ensemble of input clusterings, RCL rapidly enables these analyses in a parameter-free manner. An RCL reference implementation is provided for clustering ensembles that are associated with a network G, further restricting the RCL matrix to entries that correspond to edges in G. For a network G with m edges this implementation has complexity 𝒪(m(p2 + log(m))) where p is the number of input clusterings, taking less than a minute on a dataset with N = 27k elements, m = 1.5M edges and p = 24 clusterings. The implementation, including software for QC plots, marker gene heatmaps and other visualisations is available as part of the MCL software package (https://github.com/micans/mcl). A suggestion for a quick guide to RCL is the pseudocode in Listing 1 and the multi-resolution cluster/marker-gene heatmap in Figures 11.1-11.2, supplemented with quality control plots for clustering granularity (Figures 8.1 and 8.1) and clustering discrepancy (Pages 5-6 and Figure 8.3).