Safe Haskell | None |
---|
This module contains the code that does the tree normalization and binning.
- binthem :: [FullTree DefDecor] -> BinResults StandardDecor
- normalize :: AnnotatedTree -> AnnotatedTree
- normalizeFT :: FullTree StandardDecor -> FullTree StandardDecor
- annotateWLabLists :: NewickTree DefDecor -> AnnotatedTree
- deAnnotate :: FullTree StandardDecor -> FullTree DefDecor
- newtype OneCluster a = OneCluster {
- clustMembers :: [FullTree a]
- type BinResults a = Map StrippedTree (OneCluster a)
- type StrippedTree = NewickTree Int
- get_weight :: AnnotatedTree -> Int
- unitTests :: Test
- anonymize_annotated :: AnnotatedTree -> StrippedTree
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.
OneCluster | |
|
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
get_weight :: AnnotatedTree -> IntSource
anonymize_annotated :: AnnotatedTree -> StrippedTreeSource
For binning. Remove branch lengths and labels but leave weights.