Skip to contents

Run CytoSPACER analysis directly from Seurat objects.

Usage

run_cytospace_seurat(
  sc_seurat,
  st_seurat,
  cell_type_col = NULL,
  sc_assay = "RNA",
  st_assay = "Spatial",
  image_name = NULL,
  ...
)

Arguments

sc_seurat

Seurat object containing scRNA-seq data.

st_seurat

Seurat object containing spatial transcriptomics data.

cell_type_col

Column name in sc_seurat metadata containing cell type labels. Default is NULL (uses Idents).

sc_assay

Assay to use from sc_seurat. Default is "RNA".

st_assay

Assay to use from st_seurat. Default is "Spatial".

image_name

Name of the image in st_seurat. Default is the first image.

...

Additional arguments passed to run_cytospace.

Value

A list containing CytoSPACER results.

Details

This function automatically extracts expression matrices, cell types, and coordinates from Seurat objects. Compatible with Seurat v4 and v5.

Examples

if (FALSE) { # \dontrun{
sc <- readRDS("scRNA_seurat.rds")
st <- readRDS("visium_seurat.rds")
results <- run_cytospace_seurat(sc, st, cell_type_col = "celltype")
} # }