This function subsets both the spatial transcriptomics dataset (seu_obj) and the single-cell RNA-seq reference (ref) into cell type-specific groups. From these cell-type specific group, it computes the Spearman correlation coefficient for each cell type, providing a cell type-specific similarity metric between the datasets.
Arguments
- seu_obj
A Seurat object containing spatial transcriptomics data with cell type predictions (
celltype_pred
).- ref
A Seurat object containing single-cell RNA-seq data with annotated cell types (
cell_type
).
Value
A data frame with cell_type
and the corresponding Spearman correlation coefficient for each cell type between seu_obj
and
Details
Useful for detailed analysis of cell type-specific expression patterns, this function helps in understanding the concordance between spatial transcriptomics
data and single-cell RNA-seq references at the level of individual cell types. It requires that seu_obj
includes cell type predictions and that ref
contains
annotated cell types. The output is a list of correlation coefficients for each cell type, offering insights into which cell types show higher or lower similarity
between the two datasets.