Single-cell / Spatial feature correlation
Compute pairwise Pearson/Spearman correlation and co-occurrence matrices between features, optionally stratified by a grouping variable.
Compute pairwise Pearson/Spearman correlation and co-occurrence matrices between features, optionally stratified by a grouping variable.
Sparse correlation + co-occurrence dotplot
Description
Analysis summary
Computes, between every pair of features over sparse observations (cells or spots), both a correlation coefficient of their expression levels and the share of observations co-expressing both — the two faces of pairwise association in sparse data.
Computation
Per stratum of the optional grouping variable (or globally when absent), the observations are pivoted to a wide observation-by-feature matrix; observations missing any feature value are excluded, zero-valued ones kept. Every feature pair then gets a Pearson or Spearman correlation coefficient over the expression values, its two-sided p-value, and the co-expression share — the fraction of observations where both features' presence signals are above zero — with the observation counts backing each. The diagonal (a feature against itself) carries a coefficient of 0. Gene signatures collapse their member genes into per-observation averages before the matrix is computed.
When to use
Use for sparse single-cell or spatial-transcriptomics data, where the binary expressed/not-expressed dimension is informative alongside the correlation: it answers 'which features correlate and which actually co-occur'. For correlation matrices on bulk (dense) data, use correlation_analysis instead; for the overlap between exactly two features, use coexpression_analysis.
Caveats
Correlation over sparse counts is dominated by the many zero-zero pairs — a high correlation can mean shared abundance rather than shared regulation, which is what the co-expression share disambiguates. Each p-value is uncorrected for the many pairs tested. Observations missing any feature of the panel are dropped, so the effective cohort is the intersection across the panel.
Example questions
Input columns
Visualizations
dotplotHow to read: One dot per feature pair: its colour encodes the correlation coefficient on a diverging red-blue scale centred on zero (red positive, blue negative) and its area the share of observations co-expressing both (size legend). The two axes are the same feature list — the matrix is symmetric — and the diagonal carries no information. When the data is stratified, a dropdown switches between strata. Hovering a dot shows the coefficient, the p-value and the co-expression counts; the accompanying statistical table repeats the coefficients and p-values, each unordered pair once.
Example analysis 1
Name — Gene Correlation Heatmap for ERBB2, TP53, and ROR1 in Immune Cells (Age > 40)
Analysis parameters
Visualization — dotplot

Output table
Last updated
Was this helpful?