Skip to contents

Computes the sum of absolute pairwise Pearson correlations between cell type expression profiles. Lower values indicate more distinct profiles.

Usage

compute_correlation(data, use_cpp = getOption("darwin.use_cpp", TRUE))

Arguments

data

Numeric matrix (cell types x genes).

use_cpp

Use C++ implementation for speed. Default: TRUE.

Value

Sum of absolute pairwise Pearson correlations between rows.

Examples

data <- matrix(rnorm(50), nrow = 5, ncol = 10)
corr <- compute_correlation(data)