phybin-0.3: Utility for clustering phylogenetic trees in Newick format based on Robinson-Foulds distance.

Safe HaskellNone




This module contains the code that does the tree normalization and binning.


Binning and normalization

binthem :: [FullTree DefDecor] -> BinResults StandardDecorSource

The binning function. Takes labeled trees, classifies labels into equivalence classes.

normalize :: AnnotatedTree -> AnnotatedTreeSource

This is it, here's the routine that transforms a tree into normal form. This relies HEAVILY on lazy evaluation.

normalizeFT :: FullTree StandardDecor -> FullTree StandardDecorSource

A version lifted to operate over full trees.

annotateWLabLists :: NewickTree DefDecor -> AnnotatedTreeSource

Add the metadata that is used for binning

deAnnotate :: FullTree StandardDecor -> FullTree DefDecorSource

Take the extra annotations away. Inverse of annotateWLabLists.

newtype OneCluster a Source

When binning, the members of a OneCluster are isomorphic trees. When clustering based on robinson-foulds distance they are merely similar trees.




clustMembers :: [FullTree a]


Show a => Show (OneCluster a) 

type BinResults a = Map StrippedTree (OneCluster a)Source

Index the results of binning by topology-only stripped trees that have their decorations removed.

type StrippedTree = NewickTree IntSource

Ignore metadata (but keep weights) for the purpose of binning

Utilities and unit tests

anonymize_annotated :: AnnotatedTree -> StrippedTreeSource

For binning. Remove branch lengths and labels but leave weights.