Identify spatial patterns through PCA on average expression in a spatial grid.
detectSpatialPatterns(
gobject,
expression_values = c("normalized", "scaled", "custom"),
spatial_grid_name = "spatial_grid",
min_cells_per_grid = 4,
scale_unit = FALSE,
ncp = 100,
show_plot = TRUE,
PC_zscore = 1.5
)
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
spatial pattern object 'spatPatObj'
Steps to identify spatial patterns:
* 1. average gene expression for cells within a grid, see createSpatialGrid * 2. perform PCA on the average grid expression profiles * 3. convert variance of principal components (PCs) to z-scores and select PCs based on a z-score threshold