SpatialTopic clustering performed by calling the R package SpaTopic through Kandinsky
spatopic_clust(
data = NULL,
label = NULL,
sample_key = NULL,
n_clust = 2:9,
sigma = 25,
region_radius = 500,
kneigh = 5,
trace = TRUE,
thin = 20,
burnin = 1000,
niter = 200,
seed = 347548
)Seurat object containing Kandinsky data
character string specifying the variable name to be used to defne cell annotation groups
character string specifying a variable stored in the Seurat object to use as sample/batch annotation. If not NULL, neighbour networks will be defined separately for each sample/batch. Default is NULL.
numeric, number of expected clusters. Can be a single number or a numeric vector if multiple cluster numbers needs to be tested
Default is 50. The lengthscale of the Nearest-neighbor Exponential Kernel. Sigma controls the strength of decay of correlation with distance in the kernel function. Please check the paper for more information. Need to be adjusted based on the image resolution
Default is 400. The radius for each grid square when sampling region centers for each image. Need to be adjusted based on the image resolution and pattern complexity.
Default is 5. Only consider the top 5 closest region centers for each cell.
Default is TRUE Compute and save log likelihood, Ndk, Nwk for every posterior samples. Useful when you want to use DIC to select number of topics, but it is time consuming to compute the likelihood for every posterior samples.
Default is 20. Key parameter in Gibbs sampling. Collect a posterior sample for every thin=20 iterations.
Default is 1000. Key parameter in Gibbs sampling. Start to collect posterior samples after 1000 iterations. You may increase the number of iterations for burn-in for highly complex tissue images.
Default is 200. Key parameter in Gibbs sampling. Number of posterior samples collected for model inference.
Default is 347548 Random seed.
updated Seurat object with 'spatopic_clusters' annotation added to metadata slot
SpaTopic must be installed within the same environmnent of Kandinsky