This is a preprocessor which can (optionally) be invoked to collapse short branch lengths.
- collapseBranches :: forall a. (a -> Bool) -> (a -> a -> a) -> NewickTree a -> NewickTree a
- collapseBranchLenThresh :: Double -> NewickTree DefDecor -> NewickTree DefDecor
- collapseBranchBootStrapThresh :: Int -> NewickTree DefDecor -> NewickTree DefDecor
- pruneTreeLeaves :: Set Label -> NewickTree DefDecor -> Maybe (NewickTree DefDecor)
Removes branches that do not meet a predicate, leaving a shallower, bushier tree. This does NOT change the set of leaves (taxa), it only removes interior nodes.
`collapseBranches pred collapser tree` uses
pred to test the meta-data to see
if collapsing the intermediate node below the branch is necessary, and if it is,
collapser to reduce all the metadata for the collapsed branches into a
single piece of metadata.
A common configuration. Collapse branches based on a length threshold.
A common configuration. Collapse branches based on bootstrap values.