get_num_clust {SlideCNA} | R Documentation |
Find optimal number of clusters
Description
This function uses the Silhouette Method applied to CNV scores to determine the best number of clusters to divide the binned beads into
Usage
get_num_clust(
data,
hc_func = "ward.D2",
max_k = 10,
plot = TRUE,
malig = FALSE,
k = NA,
plot_directory
)
Arguments
data |
cnv_data list object of cnv data from SlideCNA::prep_cnv_dat() |
hc_func |
character string for which hierarchical clustering function to use |
max_k |
integer of number max number of clusters to evaluate (2:max_k) |
plot |
TRUE if plotting silhoutte scores per cluster |
malig |
TRUE if only using malignant bins and FALSE if using all bins |
k |
integer of optimal number of clusters, if known, and NA if not known |
plot_directory |
output plot directory path |
Value
An integer representing the number of clusters that optimizes the silhouette score
[Package SlideCNA version 0.1.0 Index]