Compute cell-cell interaction enrichment for spots (observed vs expected)
cellProximityEnrichmentSpots(
gobject,
spatial_network_name = "spatial_network",
cluster_column = "cell_ID",
cells_in_spot = 1,
number_of_simulations = 100,
adjust_method = c("none", "fdr", "bonferroni", "BH", "holm", "hochberg", "hommel",
"BY"),
set_seed = TRUE,
seed_number = 1234
)
giotto object
name of spatial network to use
name of column to use for clusters
cell number in each spot
number of simulations to create expected observations
method to adjust p.values
use of seed
seed number to use
List of cell Proximity scores (CPscores) in data.table format. The first data.table (raw_sim_table) shows the raw observations of both the original and simulated networks. The second data.table (enrichm_res) shows the enrichment results.
Spatial proximity enrichment or depletion between pairs of cell types is calculated by calculating the observed over the expected frequency of cell-cell proximity interactions. The expected frequency is the average frequency calculated from a number of spatial network simulations. Each individual simulation is obtained by reshuffling the cell type labels of each node (spot) in the spatial network.