tissue_expression_plot: Plots gene expression and cross-expression on tissue by...

View source: R/CrossExpression.R

tissue_expression_plotR Documentation

Plots gene expression and cross-expression on tissue by coloring cells.

Description

Plots gene expression and cross-expression on tissue by coloring cells.

Usage

tissue_expression_plot(
  data,
  locations,
  gene1,
  gene2,
  cross_expression = TRUE,
  neighbor = 1,
  point_size = 0,
  scale_bar = 0
)

Arguments

data

A cells by genes expression matrix.

locations

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

gene1

Name of gene 1.

gene2

Name of gene 2.

cross_expression

If TRUE, only cross-expressing cell pairs are shown.

neighbor

The nearest neighbor (for cross-expression).

point_size

Point size on the scatter plot.

scale_bar

Length of the scale bad in microns.

Value

Returns a plot with cells shown as points and color indicating the genes it expresses.

Examples

data("locations")
data("expression")
locations  = as.matrix(locations)
expression = as.matrix(expression)
expression = expression[,1:5]
tissue_expression_plot(data = expression, locations = locations, gene1 = "Calb1", gene2 = "Rasgrf2")


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