
Compute Cell-Type-Specific Fold Changes (FCs) for Spatial Clusters
Source:R/ComputeAvgs.R
ComputeFCs.RdThis function computes fold changes (FCs) for spatial transcriptomic data, comparing expression levels between spatial clusters within each cell type.
Arguments
- normdata
Numeric matrix of normalized expression data, where rows represent genes and columns represent cells.
- scmeta
Data frame containing metadata associated with each cell, including spatial cluster and cell type annotations.
- cluster
Character string specifying the column name in 'scmeta' containing spatial cluster annotations.
- Region
Character string specifying the column name in metadata data frames containing region annotations (default: NULL).
- scale
A boolean specifying whether to do univariance normalization.
- ncores
Integer specifying the number of CPU cores to use for parallel processing.