Skip to contents

This function performs deconvolution of spatial transcriptomics data using the `cell2location` method, leveraging reference signatures from a `screference` object.

Usage

cell2location_deconvolute(
  spatial_obj,
  scref,
  cache_path = "cell2location",
  N_cells_per_location = 30,
  detection_alpha = 20,
  max_epochs = 5000
)

Arguments

spatial_obj

A Seurat object containing the spatial transcriptomics data.

scref

A `screference` object containing cached `cell2location` reference signatures.

N_cells_per_location

An integer specifying the number of cells per location. Default is 30.

detection_alpha

An integer specifying the detection alpha parameter. Default is 20.

max_epochs

An integer specifying the maximum number of epochs for model training. Default is 5000.

Value

A tibble containing the deconvoluted cell type fractions for each sample location.