Rank spatial correlated clusters according to correlation structure

rankSpatialCorGroups(
  gobject,
  spatCorObject,
  use_clus_name = NULL,
  show_plot = NULL,
  return_plot = FALSE,
  save_plot = NULL,
  save_param = list(),
  default_save_name = "rankSpatialCorGroups"
)

Arguments

gobject

giotto object

spatCorObject

spatial correlation object

use_clus_name

name of clusters to visualize (from clusterSpatialCorFeats())

show_plot

logical. show plot

return_plot

logical. return ggplot object

save_plot

logical. directly save the plot

save_param

list of saving parameters, see showSaveParameters

default_save_name

default save name for saving, don't change, change save_name in save_param

Value

data.table with positive (within group) and negative (outside group) scores

Examples

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
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/bin/python3"

spatCorObject <- detectSpatialCorFeats(g, method = "network")
clusters <- clusterSpatialCorFeats(spatCorObject = spatCorObject)

rankSpatialCorGroups(
    gobject = g, spatCorObject = clusters,
    use_clus_name = "spat_clus"
)