cross_expression: Computes cross-expression and co-expression p-values between...

View source: R/CrossExpression.R

cross_expressionR Documentation

Computes cross-expression and co-expression p-values between all gene pairs.

Description

Computes cross-expression and co-expression p-values between all gene pairs.

Usage

cross_expression(
  data,
  locations,
  neighbor = 1,
  alpha_cross = 0.05,
  alpha_co = 0,
  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 calculating cross-expression.

alpha_cross

The significance threshold for cross-expression.

alpha_co

The significance threshold for co-expression.

output_matrix

If TRUE, outputs the cross-expression p-value matrix.

Value

Returns a list containing gene pairs with co-expression and cross-expression p-values before and after false discovery rate (FDR) correction.

Examples

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


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