fit_spruce | R Documentation |
This function allows you to detect sub-populations single-sample spatial transcriptomics experiments.
fit_spruce( seurat_obj, K, emb = "PCs", n_dim = 8, r = 3, MCAR = TRUE, CAR = TRUE, smooth = TRUE, nsim = 2000, burn = 1000, z_init = NULL )
seurat_obj |
An integrated Seurat object |
K |
The number of sub-populations to infer. Each should be present in each sample. |
emb |
Either one of "PCs", "HVGs", or "SVGs" OR a matrix with custom embeddings. If the latter, rows should be sorted as in meta data of Seurat object. |
n_dim |
The number of dimensions to use if emb is specified as one of "PCs", "HVGs", or "SVGs". Ignored if emb is a matrix of custom embeddings. |
r |
Spatial smoothing parameter. Should be greater than 0 with larger values enforcing stronger prior spatial association. |
MCAR |
Logical. Include multivariate CAR random intercepts in gene expression model? |
CAR |
Logical. Include univariate CAR random intercepts in multinomial gene expression model? |
smooth |
Logical. Use manual spatial smoothing controled by r parameter? |
nsim |
Number of total MCMC iterations to conduct. |
burn |
Number of initial MCMC iterations to discard as burn in. The number of saved iterations is nsim-burn |
z_init |
Initialized cluster allocation vector to aid in MCMC convergence. If NULL z_init will be set using hierarchical clustering. |
A list of MCMC samples, including the MAP estimate of cluster indicators (z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.