cross_expression_correlation: Computes gene-gene correlations between cross-expressing...

View source: R/CrossExpression.R

cross_expression_correlationR Documentation

Computes gene-gene correlations between cross-expressing cell-neighbor pairs. Cell and neighbor masks are used to consider mutually exclusive expression per gene pair.

Description

Computes gene-gene correlations between cross-expressing cell-neighbor pairs. Cell and neighbor masks are used to consider mutually exclusive expression per gene pair.

Usage

cross_expression_correlation(
  data,
  locations,
  neighbor = 1,
  output_matrix = FALSE
)

Arguments

data

A cells by genes expression matrix.

locations

A cells by coordinates (x-y or higher dimensions) matrix.

neighbor

The n-th nearest neighbor for computing correlations.

output_matrix

If TRUE, outputs the cross-expression correlation matrix.

Value

Returns a gene list with cross-expression correlation for each gene pair.

Examples

data("locations")
data("expression")
locations  = as.matrix(locations)
expression = as.matrix(expression)
expression = expression[,1:5]
results    = cross_expression_correlation(data = expression, locations = locations)


CrossExpression documentation built on Aug. 8, 2025, 7:25 p.m.