Skip to contents

Automates the annotation of spatial transcriptomics data using cell annotations from reference single-cell RNA-seq data. It filters cells based on transcript counts and employs a machine learning model for cell type prediction.

Usage

annotateData(seu_obj, ref, celltype_meta = "cell_type")

Arguments

seu_obj

A Seurat object containing spatial transcriptomics data that you wish to annotate.

ref

A Seurat object serving as the reference, containing single-cell RNA-seq data with cell type annotations.

celltype_meta

A string specifying the name of the metadata column in the reference Seurat object that contains cell type annotations. Defaults to "cell_type".

Value

The input Seurat object (seu_obj) with an additional metadata column (celltype_pred) containing the cell type predictions.

Details

annotateData leverages the power of single-cell reference data to annotate spatial transcriptomics data. This approach is particularly useful in studies aiming to understand tissue composition and cellular localization without the need for extensive manual annotation. The function requires the input spatial data (seu_obj) to be in Seurat format and a similarly formatted single-cell RNA-seq dataset (ref) as a reference. The reference must contain a cell type annotation column, which can be specified using the celltype_meta parameter. The function emphasizes the importance of data pre-processing, as cells with low transcript counts are removed to improve the accuracy of the cell type predictions made by the insitutypeML algorithm.