A function containing to cluster adaptively smoothed gene expression data.
Usage
p2_clustering(
spe,
batch = FALSE,
batch_by = "None",
threads = 1,
clustParams = list(clust_c = 0, subclust_c = 0, iter.max = 30, k = 5, cluster.fun =
"louvain")
)
Arguments
- spe
SpatialExperiment object. For reclust = FALSE, the object should contain logcounts and PCA, but for reculst = TRUE, the object should contain smoothed gene expression.
- batch
a logical parameter for whether or not to perform batch correction. Default value is FALSE.
- batch_by
a character indicating name of colData(spe) column containing the batch names.
- threads
a numeric value for the number of CPU cores to be used for the analysis. Default value set to 1.
- clustParams
a list of parameters for TwoStepParam clustering methods. The clustering parameters are in the order - centers (centers) for clustering with KmeansParam, centers (centers) for sub-clustering clusters with KmeansParam, maximum iterations (iter.max) for clustering with KmeansParam, k values (k) for clustering with NNGraphParam, and community detection method (cluster.fun) to use with NNGraphParam.