Learn R Programming

CAESAR.Suite (version 0.1.0)

CAESAR.coembedding: 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.

Usage

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

Value

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

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`.

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`.

See Also

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

Examples

Run this code
data(toydata)

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

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

Run the code above in your browser using DataLab