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"
)
giotto object
spatial correlation object
name of clusters to visualize
(from clusterSpatialCorFeats()
)
logical. show plot
logical. return ggplot object
logical. directly save the plot
list of saving parameters, see
showSaveParameters
default save name for saving, don't change, change save_name in save_param
data.table with positive (within group) and negative (outside group) scores
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")