Skip to contents

Performs cell type deconvolution on spatial transcriptomics data. It requires a Seurat object with spatial transcriptomics data (seu_obj) and a reference Seurat object (ref). It filters out cells with fewer than 10 transcripts to improve accuracy and uses the Robust Cell Type Deconvolution (RCTD) metric for cell type deconvolution.

Usage

getRCTD(seu_obj, ref)

Arguments

seu_obj

A Seurat object containing spatial transcriptomics data.

ref

A Seurat object containing single-cell RNA-seq data used as a reference for deconvolution.

Value

A RCTD object containing the results of the deconvolution, including cell type weights for each spatial location.

Details

The function first prepares the reference data by extracting counts, cell type annotations, and UMI counts. The reference dataset is then used to construct a Reference object. For the query (spatial) data, cells with fewer than 10 transcript counts are filtered out, and tissue coordinates are prepared. The function then runs RCTD, which uses spatial and reference data to deconvolve cell types present in the spatial dataset. The output is a modified RCTD object with cell type weights normalized across each spatial location. Users should be aware that low transcript counts may affect the accuracy of deconvolution; hence, filtering is a crucial step before analysis.