Find the spatial neighbors for a selected group of cells within the selected spatial network.
findNetworkNeighbors(
gobject,
spat_unit = NULL,
spatial_network_name = NULL,
source_cell_ids = NULL,
name = "nb_cells"
)
data.table
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#>
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/bin/python3"
findNetworkNeighbors(
gobject = g, spatial_network_name = "spatial_network",
source_cell_ids = c("AACTCGATGGCGCAGT-1", "GGCTGGCTAGCTTAAA-1")
)
#> cell_ID nb_cells
#> <char> <char>
#> 1: AACTCGATGGCGCAGT-1 both
#> 2: GGCTGGCTAGCTTAAA-1 both
#> 3: GACGCCTGTTGCAGGG-1 neighbor
#> 4: GAGGGCATCGCGTATC-1 neighbor
#> 5: TCAACACATTGGGTAA-1 others
#> ---
#> 620: GGTAGTGCTCGCACCA-1 others
#> 621: AAGCTCGTGCCAAGTC-1 others
#> 622: TATTCAATTCTAATCC-1 others
#> 623: TTCAAAGTCTCTAGCC-1 others
#> 624: TTGAATATGGACTTTC-1 others