病毒序列的高效分支分类
TreeCluster is a tool that, given a tree T (Newick format) and a distance threshold t, finds the minimum number of clusters of the leaves of T such that some user-specified constraint is met in each cluster. The user can also specify a branch support threshold s such that no pair of leaves in any cluster can be connected by branches with support less than or equal to s. Note that all leaves given a cluster of -1 are singletons, meaning they did not cluster with any other leaves (i.e., each leaf with a cluster of -1 is in its own cluster).
TreeCluster was motivated by Cluster Picker.
The default method is "Max Clade" (see Clustering Methods). There is no explicit default distance threshold, but because Cluster Picker recommends a distance threshold of 0.045 and because the same objective function is optimized by both Cluster Picker and TreeCluster "Max Clade", we currently recommend 0.045 as well.
Note that TreeCluster can run within seconds even on ultra-large datasets, so it may make sense to use a range of thresholds and determine the appropriate choice based on the results. We intend to develop non-parametric methods of TreeCluster clustering in the future.
TreeCluster can be installed using pip:
sudo pip install treeclusterIf you are using a machine on which you lack administrative powers, TreeCluster can be installed locally using pip:
pip install --user treeclusterTreeCluster can also be installed using conda:
conda install bioconda::treecluster…To help users, we have provided example files in the example directory, and we have provided some helper scripts that implement common clustering-related tasks in the helper_scripts directory:
helper_scripts/score_clusters.py: Given two clustering files, calculate a comparison metric between themAvg Clade: Cluster the leaves such that the following conditions hold for each cluster:
-v), the clades defined by the clusters will be printed to standard errorLeaf Dist Avg: Cluster the leaves by cutting the tree at t distance away from the bottom of the tree, where "bottom" is defined as the average root-to-tip distance
Leaf Dist Max: Cluster the leaves by cutting the tree at t distance away from the bottom of the tree, where "bottom" is defined as the furthest leaf from the root
Leaf Dist Min: Cluster the leaves by cutting the tree at t distance away from the bottom of the tree, where "bottom" is defined as the closest leaf to the root
Length: Cluster the leaves such that the following conditions hold for each cluster:
Length Clade: Cluster the leaves such that the following conditions hold for each cluster:
-v), the clades defined by the clusters will be printed to standard errorMax: Cluster the leaves such that the following conditions hold for each cluster:
Max Clade: Cluster the leaves such that the following conditions hold for each cluster:
-v), the clades defined by the clusters will be printed to standard errorMed Clade: Cluster the leaves such that the following conditions hold for each cluster:
-v), the clades defined by the clusters will be printed to standard errorRoot Dist: Cluster the leaves by cutting the tree at t distance away from the root
Single Linkage: Cluster the leaves such that the following conditions hold:
Sum Branch: Cluster the leaves such that the following conditions hold for each cluster:
Sum Branch Clade: Cluster the leaves such that the following conditions hold for each cluster:
-v), the clades defined by the clusters will be printed to standard errorIf you use TreeCluster in your work, please cite:
Balaban M, Moshiri N, Mai U, Jia X, Mirarab S (2019). "TreeCluster: Clustering biological sequences using phylogenetic trees." PLoS ONE. 14(8):e0221068. doi:10.1371/journal.pone.0221068
暂无开放 Issues,或尚未同步最近议题。