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. It's the heart of the program.



driver :: PhyBinConfig -> IO ()Source

Driver to put all the pieces together (parse, normalize, bin)

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.

annotateWLabLists :: NewickTree DefDecor -> AnnotatedTreeSource

Add the metadata that is used for binning

acquireTreeFiles :: [String] -> IO [String]Source

Expand out directories to find all the tree files.

deAnnotate :: FullTree StandardDecor -> FullTree DefDecorSource

Take the extra annotations away. Inverse of annotateWLabLists.

retrieveHighlights :: (String -> String) -> LabelTable -> [FilePath] -> IO [[NewickTree ()]]Source

Parse extra trees in addition to the main inputs (for --highlight).

matchAnyHighlight :: [[NewickTree ()]] -> NewickTree () -> BoolSource

Create a predicate that tests trees for consistency with the set of --highlight (consensus) trees.

Note, tree consistency is not the same as an exact match. It's like (<=) rather than (==). All trees are consistent with the star topology.