Skip to contents

Combines 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.

Usage

ColocalizationMetaAnalysis(colocalization_results, cap = 5, min.samples = 1)

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.

Value

A list with:

MetaColocIndex

a states x states matrix of integrated colocalization indices.

MetaPval

a named numeric vector of combined per-SE two-sided p-values, Stouffer-combined across samples.