benchmark.clustering.Rd
Supervised (ARI and NMI) and unsupervised (ASW, Dunn Index, and Connectivity) benchmarking metrics are calculated for cluster assignments. assays, clustering and reduction for distance calculations are iterated through.
benchmark.clustering(
object,
assay,
clustering,
reduction,
n.dims = 2,
dist.method = "euclidean",
ground.truth.column = NULL,
verbose = FALSE,
seed = 1234
)
IBRAP S4 class object
Character. String containing indicating which assay to use
Character. The names of the cluster assignment dataframes to use
Character. Which reduction(s) within the assay should be supplied for distance calcultions
Numerical. How many dimensions of the reduction should be supplied. Default = 1:3
Character. Which distance method should be used, options: 'euclidean', 'maximum', 'manhattan', 'canberra', 'binary', 'minkowski'. Default = 'euclidean'
Character. If available, supply the column in the object metadata that contains ground truth labels, i.e. true cell type labels. If this is not supplied, only unsupervised methods will be supplied. Default = NULL
Logical. Should system information be printed. Default = FALSE
Numeric. What should the seed be set as. Default = 1234
Benchmarking scores for the supplied cluster assignments
# without ground truth labels
object <- benchmark.clustering(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'),
clustering = c("pca_harmony_nn:louvain"),
reduction = c('pca_harmony_umap'),
n.dims = 1:2)
#> Error in is(object = object, class2 = "IBRAP"): object 'object' not found
# With ground truth labels
object <- benchmark.clustering(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'),
clustering = c("pca_harmony_nn.v1:louvain"),
reduction = c('pca_harmony_umap'),
n.dims = 1:2, ground.truth = metadata$celltypes)
#> Error in is(object = object, class2 = "IBRAP"): object 'object' not found