fit_banyan | R Documentation |
This function allows you to fit the Bayesian multi-layer SBM for integration of spatial and gene expression data for identifying cell sub-populations
fit_banyan( seurat_obj = NULL, labels = NULL, exp = NULL, coords_df = NULL, z_init = NULL, K, n_pcs = 16, R = NULL, a0 = 2, b10 = 1, b20 = 1, n_iter = 1000, burn = 100, verbose = TRUE, s = 1.2 )
seurat_obj |
A Seurat object with PCA reduction and spatial coordinates. If provided, the exp and coords arguments are ignored |
labels |
User-defined tissue architecture labels as a length-n vector. If provided, only posterior of ACC parameters will be provided and tissue architecture identification will be skipped. |
exp |
A binary adjacency matrix encoding the gene expression network. Not used if seurat_obj is provided. |
coords_df |
A matrix or data frame with rows as cells and 2 columns for coordinates. Rows should be ordered the same as in exp. Not used if seurat_obj is provided. |
z_init |
An optional initialization for cluster indicators. Ignored if seurat_obj is provided. |
K |
The number of sub-populations to infer |
n_pcs |
The number of principal components to use from the Seurat object |
R |
A length 2 vector of integers for the number of neighbors to use. 1st element corresponds to the number of neighbors in gene expression network and 2nd element for spatial. |
a0 |
Dirichlet prior parameter (shared across all communities) |
b10 |
Beta prior number of connections |
b20 |
Beta prior number on non-edges |
n_iter |
The number of total MCMC iterations to run. |
burn |
The number of MCMC iterations to discard as burn-in. A total of n_iter - burn iterations will be saved. |
verbose |
Whether or not to print cluster allocations at each iteration |
s |
Louvain resolution parameter |
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.