Skip to contents

This function creates a data frame containing gene expression values for a specified gene across shared spatial pixels in two SpatialExperiment objects.

Usage

getGenePixelDF(x, y, gene, assayName = assayName)

Arguments

x

A SpatialExperiment object representing the first dataset.

y

A SpatialExperiment object representing the second dataset.

gene

A character string specifying the gene of interest.

assayName

A character string or numeric specifying the assay in the Spatial Experiment to use.

Value

A data frame with three columns:

pixel

Character vector of shared pixel IDs between both experiments.

y

Numeric vector of gene expression values from `y` (second SpatialExperiment).

x

Numeric vector of gene expression values from `x` (first SpatialExperiment).