
Integrate Spatial Clusters From Multiple Samples Via Similarity Network Fusion
Source:R/Integrate.R
Integrate.RdThis function identifies conserved spatial ecotypes based on cell type specific gene expression signature of spatial clusters from all samples.
Usage
Integrate(
avgexprs,
Region = NULL,
downsample.by.region = TRUE,
nfeatures = 200,
min.features = 5,
minibatch = 5000,
ncores = 1,
seed = 1
)Arguments
- avgexprs
Gene expression signature of spatial clusters, where each column represents a spatial cluster (celltype..gene x spatial cluster matrix).
- Region
A character vector specifying the region annotations for all spatial clusters.
- downsample.by.region
A Boolean indicating whether to perform downsampling to balance the number of spatial clusters across regions.
- nfeatures
Integer specifying the maximum number of top variable genes to select for each cell type.
- min.features
Integer specifying the minimum number of shared features (genes) required across samples.
- minibatch
Integer specifying the number of columns to process in each minibatch in the SNF analysis. Default is 5000. This option splits the matrix into smaller chunks (minibatch), thus reducing memory usage.
- ncores
Integer specifying the number of cores for parallel processing. Default is 1.
- seed
An integer used to seed the random number generator.