Copyright | (c) Dominik Schrempf 2019 |
---|---|
License | GPL-3 |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Thu Jan 17 14:16:34 2019.
Synopsis
- class Measurable a where
- distancesRootLeaves :: Measurable a => Tree a -> [Double]
- distancesOriginLeaves :: Measurable a => Tree a -> [Double]
- averageDistanceOriginLeaves :: Measurable a => Tree a -> Double
- height :: Measurable a => Tree a -> Double
- rootHeight :: Measurable a => Tree a -> Double
- lengthenStem :: Measurable a => Double -> Tree a -> Tree a
- shortenStem :: Measurable a => Double -> Tree a -> Tree a
- summarize :: Measurable a => Tree a -> ByteString
- totalBranchLength :: Measurable a => Tree a -> Double
- normalize :: Measurable a => Tree a -> Tree a
- prune :: Measurable a => Tree a -> Tree a
- removeMultifurcations :: Measurable a => Tree a -> Tree a
- ultrametric :: Measurable a => Tree a -> Bool
Documentation
class Measurable a where Source #
A Node
label with measurable and modifiable branch length to the parent.
getLen :: a -> Double Source #
Length of attached branch.
setLen :: Double -> a -> a Source #
Set attached branch length.
Instances
Measurable (PhyloLabel a) Source # | If no branch length is available, 0 is returned. This is probably not the best (and final) behavior. |
Defined in ELynx.Data.Tree.PhyloTree getLen :: PhyloLabel a -> Double Source # setLen :: Double -> PhyloLabel a -> PhyloLabel a Source # |
distancesRootLeaves :: Measurable a => Tree a -> [Double] Source #
Distances from the root node of a tree to its leaves (this are not the
distances from the origin to the leaves, see distancesOriginLeaves
).
distancesOriginLeaves :: Measurable a => Tree a -> [Double] Source #
Distances from the origin of a tree to its leaves (this is not the distance
from the root node to the leaves, which would be distanceOriginLeaves t -
(getLen $ rootLabel t)
.). See also distancesRootLeaves
.
averageDistanceOriginLeaves :: Measurable a => Tree a -> Double Source #
Average distance from the origin of a tree to its leaves, see
distancesOriginLeaves
.
height :: Measurable a => Tree a -> Double Source #
Height (max distance between origin and leaves) of a tree. Return 0 if the tree is empty.
rootHeight :: Measurable a => Tree a -> Double Source #
Height of root node. Return 0 if the tree is empty.
lengthenStem :: Measurable a => Double -> Tree a -> Tree a Source #
Lengthen the distance between root and origin.
shortenStem :: Measurable a => Double -> Tree a -> Tree a Source #
Lengthen the distance between root and origin.
summarize :: Measurable a => Tree a -> ByteString Source #
Summarize a tree with measureable branch lengths.
totalBranchLength :: Measurable a => Tree a -> Double Source #
Total branch length of a tree.
normalize :: Measurable a => Tree a -> Tree a Source #
Normalize tree so that sum of branch lengths is 1.0.
prune :: Measurable a => Tree a -> Tree a Source #
Prune degree 2 nodes. Add branch lengths but forget pruned node label. See
pruneWith
.
removeMultifurcations :: Measurable a => Tree a -> Tree a Source #
Remove multifurcations by copying multifurcating nodes and introducing branches of length 0.
ultrametric :: Measurable a => Tree a -> Bool Source #
Check if a tree is ultrametric.