| Copyright | 2021 Dominik Schrempf |
|---|---|
| License | GPL-3.0-or-later |
| Maintainer | dominik.schrempf@gmail.com |
| Stability | unstable |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | 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
- data PointProcess a b = PointProcess {}
- data TimeSpec
- simulate :: StatefulGen g m => Int -> TimeSpec -> Rate -> Rate -> g -> m (PointProcess Int Double)
- toReconstructedTree :: a -> PointProcess a Length -> Tree Length a
- simulateReconstructedTree :: StatefulGen g m => Int -> TimeSpec -> Rate -> Rate -> g -> m (Tree Length Int)
- simulateNReconstructedTrees :: StatefulGen g m => Int -> Int -> TimeSpec -> Rate -> Rate -> g -> m (Forest Length Int)
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 | |
Instances
| (Read a, Read b) => Read (PointProcess a b) Source # | |
Defined in ELynx.Tree.Simulate.PointProcess Methods readsPrec :: Int -> ReadS (PointProcess a b) # readList :: ReadS [PointProcess a b] # readPrec :: ReadPrec (PointProcess a b) # readListPrec :: ReadPrec [PointProcess a b] # | |
| (Show a, Show b) => Show (PointProcess a b) Source # | |
Defined in ELynx.Tree.Simulate.PointProcess Methods showsPrec :: Int -> PointProcess a b -> ShowS # show :: PointProcess a b -> String # showList :: [PointProcess a b] -> ShowS # | |
| (Eq a, Eq b) => Eq (PointProcess a b) Source # | |
Defined in ELynx.Tree.Simulate.PointProcess Methods (==) :: PointProcess a b -> PointProcess a b -> Bool # (/=) :: PointProcess a b -> PointProcess a b -> Bool # | |
Tree height specification.
Arguments
| :: StatefulGen g m | |
| => Int | Number of points (samples). |
| -> TimeSpec | Time of origin or MRCA. |
| -> Rate | Birth rate. |
| -> Rate | Death rate. |
| -> g | |
| -> m (PointProcess Int Double) |
Sample a point process using the BirthDeathDistribution. The names of the
points will be integers.
toReconstructedTree :: a -> PointProcess a Length -> Tree Length a Source #
Convert a point process to a reconstructed tree. See Lemma 2.2.
simulateReconstructedTree Source #
Arguments
| :: StatefulGen g m | |
| => Int | Number of points (samples) |
| -> TimeSpec | Time of origin or MRCA |
| -> Rate | Birth rate |
| -> Rate | Death rate |
| -> g | |
| -> 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.
simulateNReconstructedTrees Source #
Arguments
| :: StatefulGen g m | |
| => Int | Number of trees |
| -> Int | Number of points (samples) |
| -> TimeSpec | Time of origin or MRCA |
| -> Rate | Birth rate |
| -> Rate | Death rate |
| -> g | |
| -> m (Forest Length Int) |
See simulateReconstructedTree, but n times.