cluster cells using kmeans algorithm
doKmeans(
gobject,
expression_values = c("normalized", "scaled", "custom"),
genes_to_use = NULL,
dim_reduction_to_use = c("cells", "pca", "umap", "tsne"),
dim_reduction_name = "pca",
dimensions_to_use = 1:10,
distance_method = c("original", "pearson", "spearman", "euclidean", "maximum",
"manhattan", "canberra", "binary", "minkowski"),
centers = 10,
iter_max = 100,
nstart = 1000,
algorithm = "Hartigan-Wong",
name = "kmeans",
return_gobject = TRUE,
set_seed = T,
seed_number = 1234
)
giotto object
expression values to use
subset of genes to use
dimension reduction to use
dimensions reduction name
dimensions to use
distance method
number of final clusters
kmeans maximum iterations
kmeans nstart
kmeans algorithm
name for kmeans 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.
data(mini_giotto_single_cell)
#> Warning: data set ‘mini_giotto_single_cell’ not found
mini_giotto_single_cell = doKmeans(mini_giotto_single_cell, centers = 4, name = 'kmeans_clus')
#> Warning: restarting interrupted promise evaluation
#> Warning: restarting interrupted promise evaluation
#> Error: object 'mini_giotto_single_cell' not found
plotUMAP_2D(mini_giotto_single_cell, cell_color = 'kmeans_clus', point_size = 3)
#> Error: object 'mini_giotto_single_cell' not found