plot_clustering_difference_boxplot {ClustAssess} | R Documentation |
Clustering Method Stability Boxplot
Description
Display EC consistency across clustering method and resolution values. The 'filtered' field of the object returned by the 'get_clustering_difference_object' method is used. Above each boxplot, the number of clusters is displayed.
Usage
plot_clustering_difference_boxplot(clustering_difference_object, text_size = 3)
Arguments
clustering_difference_object |
An object returned by the 'get_clustering_difference_object' method. |
text_size |
The size of the labels above boxplots. |
Value
A ggplot2 object with the EC consistency distributions. Higher consistency indicates a more stable clustering.
Examples
set.seed(2021)
# create an artificial expression matrix
expr_matrix = matrix(runif(500*10), nrow = 500)
rownames(expr_matrix) = as.character(1:500)
adj_matrix = Seurat::FindNeighbors(expr_matrix,
k.param = 10,
nn.method = "rann",
verbose = FALSE,
compute.SNN = FALSE)$nn
clust_diff_obj = get_clustering_difference(graph_adjacency_matrix = adj_matrix,
resolution = c(0.5, 1),
n_repetitions = 10,
algorithm = 1:2,
verbose = FALSE)
plot_clustering_difference_boxplot(clust_diff_obj)
[Package ClustAssess version 0.3.0 Index]