elynx-tree-0.0.1: Handle phylogenetic trees

Copyright(c) Dominik Schrempf 2019
LicenseGPL-3
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Data.Tree.Distance

Description

Creation date: Thu Jun 13 17:15:54 2019.

Various distance functions for phylogenetic trees (and binary trees in general). All trees are assumed to be UNROOTED.

Synopsis

Documentation

symmetricDistance :: Ord a => Tree a -> Tree a -> Int Source #

See symmetricDistanceWith, but with id for comparisons.

symmetricDistanceWith :: Ord b => (a -> b) -> Tree a -> Tree a -> Int Source #

Symmetric (Robinson-Foulds) distance between two trees. Before comparing the leaf labels, apply a given function. This is useful, for example, to compare the labels of Named trees on their names only. The tree is assumed to be UNROOTED!

XXX: Comparing a list of trees with this function recomputes bipartitions.

incompatibleSplitsDistance :: (Ord a, Show a) => Tree a -> Tree a -> Int Source #

See incompatibleSplitsDistanceWith, use id for comparisons.

incompatibleSplitsDistanceWith :: (Ord b, Show b) => (a -> b) -> Tree a -> Tree a -> Int Source #

Number of incompatible splits. Similar to symmetricDistanceWith but merges multifurcations.

XXX: Comparing a list of trees with this function recomputes bipartitions.

computePairwiseDistances Source #

Arguments

:: (a -> a -> b)

Distance function

-> [a]

Input trees

-> [(Int, Int, b)]

(index i, index j, distance i j)

Compute pairwise distances of a list of input trees. Use given distance measure. Returns a triple, the first two elements are the indices of the compared trees, the third is the distance.

computeAdjacentDistances Source #

Arguments

:: (Tree a -> Tree a -> b)

Distance function

-> [Tree a]

Input trees

-> [b] 

Compute distances between adjacent pairs of a list of input trees. Use given distance measure.

branchScoreDistance :: (Ord a, Measurable a, Named a) => Tree a -> Tree a -> Double Source #

See branchScoreDistanceWith, use id for comparisons.

branchScoreDistanceWith Source #

Arguments

:: (Ord a, Ord b, Floating c) 
=> (a -> b)

Label to compare on

-> (a -> c)

Branch information (e.g., length) associated with a node

-> Tree a 
-> Tree a 
-> c 

Compute branch score distance between two trees. Before comparing the leaf labels, apply a function. This is useful, for example, to compare the labels of Named trees on their names only. The branch information which is compared to compute the distance is extracted from the nodes with a given function. Assumes that the trees are UNROOTED.

XXX: Comparing a list of trees with this function recomputes bipartitions.