elynx-tree-0.6.0.0: Handle phylogenetic trees
Copyright (c) Dominik Schrempf 2021 GPL-3.0-or-later dominik.schrempf@gmail.com unstable portable None Haskell2010

ELynx.Tree.Simulate.PointProcess

Description

Creation date: Tue Feb 13 13:16:18 2018.

See Gernhard, T. (2008). The conditioned reconstructed process. Journal of Theoretical Biology, 253(4), 769–778. http://doi.org/10.1016/j.jtbi.2008.04.005.

The point process can be used to simulate reconstructed trees under the birth and death process.

Synopsis

# Documentation

data PointProcess a b Source #

A point process for $$n$$ points and of age $$t_{or}$$ is defined as follows. Draw $n$ points on the horizontal axis at $$1,2,\ldots,n$$. Pick $$n-1$$ points at locations $$(i+1/2, s_i)$$, $$i=1,2,\ldots,n-1$$; $$0 < s_i < t_{or}$$. There is a bijection between (ranked) oriented trees and the point process. Usually, a will be String (or Int) and b will be Double.

Constructors

 PointProcess Fieldspoints :: ![a] values :: ![b] origin :: !b

#### Instances

Instances details
 (Eq a, Eq b) => Eq (PointProcess a b) Source # Instance detailsDefined in ELynx.Tree.Simulate.PointProcess Methods(==) :: PointProcess a b -> PointProcess a b -> Bool #(/=) :: PointProcess a b -> PointProcess a b -> Bool # (Read a, Read b) => Read (PointProcess a b) Source # Instance detailsDefined in ELynx.Tree.Simulate.PointProcess MethodsreadsPrec :: Int -> ReadS (PointProcess a b) #readList :: ReadS [PointProcess a b] # (Show a, Show b) => Show (PointProcess a b) Source # Instance detailsDefined in ELynx.Tree.Simulate.PointProcess MethodsshowsPrec :: Int -> PointProcess a b -> ShowS #show :: PointProcess a b -> String #showList :: [PointProcess a b] -> ShowS #

data TimeSpec Source #

Tree height specification.

Constructors

 Random Sample time of origin from respective distribution. Origin Time Condition on time of origin. Mrca Time Condition on time of most recent common ancestor (MRCA).

Arguments

 :: PrimMonad m => Int Number of points (samples). -> TimeSpec Time of origin or MRCA. -> Rate Birth rate. -> Rate Death rate. -> Gen (PrimState m) Generator. -> m (PointProcess Int Double)

Sample a point process using the BirthDeathDistribution. The names of the points will be integers.

Convert a point process to a reconstructed tree. See Lemma 2.2.

Arguments

 :: PrimMonad m => Int Number of points (samples) -> TimeSpec Time of origin or MRCA -> Rate Birth rate -> Rate Death rate -> Gen (PrimState m) Generator (see MWC) -> m (Tree Length Int)

Use the point process to simulate a reconstructed tree (see toReconstructedTree) possibly with specific height and a fixed number of leaves according to the birth and death process.

Arguments

 :: PrimMonad m => Int Number of trees -> Int Number of points (samples) -> TimeSpec Time of origin or MRCA -> Rate Birth rate -> Rate Death rate -> Gen (PrimState m) Generator (see MWC) -> m (Forest Length Int)

See simulateReconstructedTree, but n times.