JSDtree_cluster {RPANDA} | R Documentation |
Clustering of phylogenies
Description
Clusters phylogenies using hierarchical and k-medoids clustering
Usage
JSDtree_cluster(JSDtree,alpha=0.9,draw=T)
Arguments
JSDtree |
a matrix of distances between phylogenie pairs, typically the output of the JSDtree function when the distance is measured as the Jensen-Shannon distance |
alpha |
the confidence value for demarcating clusters in the hierarchical clustering plot; the default is 0.9 |
draw |
plot heatmap and hierarchical cluster in new windows |
Value
plots a heatmap and a hierarchical cluster with bootstrap support, and outputs results of the k-medoids clustering in the form of a list with the following components
clusters |
the optimal number of clusters around medoids (see pamk documentation) |
cluster_assignments |
assignments of trees to clusters |
cluster_support |
a list with the following components: widths: a table specifying the cluster to which each tree belongs, the neighbor (i.e. most similar) cluster, and the silhouette width of the observation (see silhouette documentation); clus.avg.widths: average silhouette width for each cluster; vg.width: average silhouette width across all clusters |
Note
The k-medoids clustering may not work with fewer than 10 trees
Author(s)
E Lewitus
References
Lewitus, E., Morlon, H., Characterizing and comparing phylogenies from their Laplacian spectrum, bioRxiv doi: http://dx.doi.org/10.1101/026476
See Also
Examples
trees<-TESS::tess.sim.age(n=20,age=10,0.15,0.05,MRCA=TRUE)
res<-JSDtree(trees)
#JSDtree_cluster(res,alpha=0.9,draw=T)