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