Split dendrogram at each node and keep the leave (label) information.

getDendrogramSplits(
  gobject,
  spat_unit = NULL,
  feat_type = NULL,
  expression_values = c("normalized", "scaled", "custom"),
  cluster_column,
  cor = c("pearson", "spearman"),
  distance = "ward.D",
  h = NULL,
  h_color = "red",
  show_dend = TRUE,
  verbose = TRUE
)

Arguments

gobject

giotto object

spat_unit

spatial unit

feat_type

feature type

expression_values

expression values to use

cluster_column

name of column to use for clusters

cor

correlation score to calculate distance

distance

distance method to use for hierarchical clustering

h

height of horizontal lines to plot

h_color

color of horizontal lines

show_dend

show dendrogram

verbose

be verbose

Value

data.table object

Details

Creates a data.table with three columns and each row represents a node in the dendrogram. For each node the height of the node is given together with the two subdendrograms. This information can be used to determine in a hierarchical manner differentially expressed marker genes at each node.

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"

getDendrogramSplits(g, cluster_column = "leiden_clus")
#> Error: package 'dendextend' is not yet installed
#> 
#>  To install:
#> install.packages(c("dendextend"))