computeBanksy | R Documentation |
Compute the component neighborhood matrices for the BANKSY matrix.
computeBanksy(
se,
assay_name,
coord_names = NULL,
compute_agf = FALSE,
k_geom = 15,
spatial_mode = c("kNN_median", "kNN_r", "kNN_rn", "kNN_rank", "kNN_unif", "rNN_gauss"),
n = 2,
sigma = 1.5,
alpha = 0.05,
k_spatial = 100L,
M = NULL,
sample_size = NULL,
sample_renorm = TRUE,
seed = NULL,
dimensions = "all",
center = TRUE,
verbose = TRUE
)
se |
A |
assay_name |
A string scalar specifying the name of the assay to use. |
coord_names |
A string vector specifying the names in |
compute_agf |
A logical scalar specifying whether to compute the AGF. |
k_geom |
An integer scalar specifying the number of neighbors to use.
Values |
spatial_mode |
A string scalar specifying the kernel for neighborhood computation (default: kNN_median).
|
n |
A numeric scalar specifying the exponent of radius (for kNN_rn). |
sigma |
A numeric scalar specifying the std. dev. of Gaussian kernel (for rNN_gauss). |
alpha |
A numeric scalar specifying the radius used: larger alphas give smaller radii (for rNN_gauss). |
k_spatial |
An integer scalar specifying the initial number of neighbors to use (for rNN_gauss) |
M |
Advanced usage. A integer scalar specifying the highest azimuthal
Fourier harmonic to compute. If specified, overwrites the |
sample_size |
An integer scalar number of neighbors to sample from the neighborhood. |
sample_renorm |
A logical scalar specifying whether to renormalize the neighbor weights to 1. |
seed |
An integer scalar specifying seed for sampling the neighborhood. |
dimensions |
A character vector specifying the dimensions to use when computing neighborhood.
|
center |
A logical scalar specifying whether to center higher order harmonics in local neighborhoods. |
verbose |
A logical scalar specifying verbosity. |
Given an expression matrix (as specified by assay_name
), this function
computes the mean neighborhood matrix (H0
) and optionally, the
azimuthal Gabor filter (AGF) matrix (H1
). The number of neighbors
used to define the spatial neighborhood is given by k_geom
.
Different kernels may be used to compute the neighborhood features,
specified by spatial_mode
.
A SpatialExperiment / SingleCellExperiment / SummarizedExperiment object with neighborhood matrices added.
data(rings)
spe <- computeBanksy(rings, assay_name = "counts", M = 1, k_geom = c(15, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.