
Meta-analysis of colocalization results across samples
Source:R/ColocalizationMetaAnalysis.R
ColocalizationMetaAnalysis.RdCombines per-sample pairwise colocalization index matrices and per-SE p-values into a single meta-analysis summary, using Stouffer's method for both the colocalization index matrix and the SE-level statistics.
Arguments
- colocalization_results
list, one element per sample. Each element must itself be a list containing:
- ColocIndex
a matrix of pairwise colocalization indices, with `rownames()`/`colnames()` equal to cell state labels.
- Pval
a named numeric vector of per-SE two-sided p-values, as returned by
Colocalization/CoassociationTest. When these p-values carry a `"Zscore"` attribute (the default when produced by those functions), the signed Z-scores are used to combine samples so that effect direction is preserved; otherwise the Z-score magnitude is recovered from the p-value and direction is treated as unknown.
- cap
numeric > 0, symmetric cap applied to `ColocIndex` values before combining (values are clipped to `[-cap, cap]`) to limit the influence of extreme outlier indices from any single sample.
- min.samples
integer >= 1, minimum number of samples a cell state must be backed by to be retained in the combined result. Cell states appearing in the `ColocIndex` matrix of fewer than `min.samples` samples are dropped.