Analyze Intra-Cluster Genetic Variation
Source:R/cluster_stats.R
intra_cluster_genetic_var_analysis.RdThis function analyzes genetic diversity within clusters by identifying variant sites and calculating mutational spectra (e.g. transition and transversion rates). It uses a DNA alignment and a vector of cluster assignments (named by sequence IDs) and returns a data frame summarizing the diversity measures for each cluster as well as for the overall population.