Creates pseudobulk gene expression matrices from single-cell RNA-seq data.
Arguments
- seu_obj
A Seurat object containing single-cell RNA-seq data. The object must have a counts matrix in the "RNA" assay and metadata that includes cell type annotations.
- celltype_meta
A string specifying the name of the metadata column in the Seurat object that contains cell type annotations. Defaults to "cell_type".
Value
A matrix where each column represents a pseudobulk sample (averaged expression levels) for a specific cell type. Row names correspond to genes.
Details
This function generates pseudobulk expression matrices by averaging the expression levels of cells within the same cell type. It takes a Seurat object as input, along with a specification for the metadata column that defines cell types. Each column in the output matrix represents a cell type, with row names corresponding to genes and cell counts averaged across cells of the same type.