Learn R Programming

CrossExpression (version 1.0.0)

cross_expression: 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
)

Value

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

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.

Examples

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

Run the code above in your browser using DataLab