GetAvgExpressionMatrix: Calculate Average Expression Matrix for Marker Genes in...

View source: R/DotPlotFxs.R

GetAvgExpressionMatrixR Documentation

Calculate Average Expression Matrix for Marker Genes in Seurat Object

Description

Computes the average expression for a specified set of marker genes across groups defined by a label column within a Seurat object. This function facilitates the exploration of gene expression patterns across different cell types or conditions defined in the dataset.

Usage

GetAvgExpressionMatrix(SerObj, labelColumn, markerVec)

Arguments

SerObj

A Seurat object containing single-cell RNA-seq data.

labelColumn

A string specifying the name of the column in the metadata of the Seurat object that defines the groups (e.g., cell types or conditions) for which the average expression should be calculated.

markerVec

A vector of strings representing the marker genes for which the average expression is to be computed.

Value

A matrix with rows corresponding to marker genes and columns to the groups defined in 'labelColumn'. Each cell in the matrix represents the average expression of a gene in a group.

Examples

avgExprMatrix <- GetAvgExpressionMatrix(mySeuratObject, "cell_type", c("GeneA", "GeneB", "GeneC"))


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.