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
#> cell_spatInfo_spatVector.shp
#> cell
#> 
#> 3.2 read Giotto spatial centroid information
#> cell
#> 
#> 3.3 read Giotto spatial overlap information
#> No overlaps were found, overlap loading will be
#>  skipped
#> 
#> 4. read Giotto image information
#> a giotto python environment was found
#> Using python path:
#>  "/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw"

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

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