CAESAR.coembedding: Compute Co-embedding Using CAESAR

View source: R/caesar.R

CAESAR.coembeddingR Documentation

Compute Co-embedding Using CAESAR

Description

This function performs co-embedding of both cells and genes using the CAESAR method. It integrates spatial transcriptomics data from a Seurat object ('seu') with a spatial adjacency matrix to compute the low-dimensional co-embedding. When spatial location information is not provided, we use a non-centered linear factor model to construct the co-embedding.

Usage

CAESAR.coembedding(
  seu,
  pos = NULL,
  reduction.name = "caesar",
  q = 50,
  radius.upper = 400,
  ...
)

Arguments

seu

A Seurat object containing spatial transcriptomics data.

pos

A matrix of spatial coordinates for the spots (e.g., spatial positions of cells or pixels in the image). The row names of 'pos' should match the column names of 'seu'. When pos is NULL, we use a non-centered linear factor model to construct the co-embedding.

reduction.name

A character string specifying the name of the dimensional reduction method to store in the Seurat object. Default is "caesar".

q

An integer specifying the number of dimensions for the reduced co-embeddings. Default is 50.

radius.upper

A numeric value specifying the upper limit of the search radius for the spatial adjacency matrix. Default is 400.

...

Additional arguments passed to 'cellembedding_image_seurat'.

Value

The modified Seurat object with the computed cell and gene embeddings stored in the specified reduction slot.

See Also

cellembedding_seurat for computing cell embeddings. add.gene.embedding for adding gene embeddings to a Seurat object.

Examples

data(toydata)

seu <- toydata$seu
pos <- toydata$pos

seu <- CAESAR.coembedding(
    seu = seu,
    pos = pos
)
print(seu)

CAESAR.Suite documentation built on Nov. 7, 2025, 5:11 p.m.