cluster cells using hierarchical clustering algorithm
doHclust(
gobject,
spat_unit = NULL,
feat_type = NULL,
expression_values = c("normalized", "scaled", "custom"),
feats_to_use = NULL,
dim_reduction_to_use = c("cells", "pca", "umap", "tsne"),
dim_reduction_name = "pca",
dimensions_to_use = 1:10,
distance_method = c("pearson", "spearman", "original", "euclidean", "maximum",
"manhattan", "canberra", "binary", "minkowski"),
agglomeration_method = c("ward.D2", "ward.D", "single", "complete", "average",
"mcquitty", "median", "centroid"),
k = 10,
h = NULL,
name = "hclust",
return_gobject = TRUE,
set_seed = TRUE,
seed_number = 1234
)
giotto object
spatial unit
feature type
expression values to use
subset of features to use
dimension reduction to use
dimensions reduction name
dimensions to use
distance method
agglomeration method for hclust
number of final clusters
cut hierarchical tree at height = h
name for hierarchical clustering
boolean: return giotto object (default = TRUE)
set seed
number for seed
giotto object with new clusters appended to cell metadata
Description on how to use Kmeans clustering method.
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"
doHclust(g)
#> An object of class giotto
#> >Active spat_unit: cell
#> >Active feat_type: rna
#> dimensions : 634, 624 (features, cells)
#> [SUBCELLULAR INFO]
#> polygons : cell
#> [AGGREGATE INFO]
#> expression -----------------------
#> [cell][rna] raw normalized scaled
#> spatial locations ----------------
#> [cell] raw
#> spatial networks -----------------
#> [cell] Delaunay_network spatial_network
#> spatial enrichments --------------
#> [cell][rna] cluster_metagene DWLS
#> dim reduction --------------------
#> [cell][rna] pca custom_pca umap custom_umap tsne
#> nearest neighbor networks --------
#> [cell][rna] sNN.pca custom_NN
#> attached images ------------------
#> images : alignment image
#>
#>
#> Use objHistory() to see steps and params used