detectSpatialPatterns#
Last Updated: Jan 14, 2025
Description#
Identify spatial patterns through PCA on average expression in a spatial grid.
Usage#
detectSpatialPatterns(
gobject,
expression_values = c("normalized", "scaled", "custom"),
spatial_grid_name = "spatial_grid",
min_cells_per_grid = 4,
scale_unit = F,
ncp = 100,
show_plot = T,
PC_zscore = 1.5
)
Arguments#
|
giotto object |
|
expression values to use |
|
name of spatial grid to use (default = ‘spatial_grid’) |
|
minimum number of cells in a grid to be considered |
|
scale features |
|
number of principal components to calculate |
|
show plots |
|
minimum z-score of variance explained by a PC |
Details#
Steps to identify spatial patterns:
1. average gene expression for cells within a grid, see createSpatialGrid
perform PCA on the average grid expression profiles
3. convert variance of principlal components (PCs) to z-scores and select PCs based on a z-score threshold
Value#
spatial pattern object ‘spatPatObj’