Copyright | (c) Dominik Schrempf 2021 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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 :: PrimMonad m => Int -> TimeSpec -> Rate -> Rate -> Gen (PrimState m) -> m (PointProcess Int Double)
- toReconstructedTree :: a -> PointProcess a Length -> Tree Length a
- simulateReconstructedTree :: PrimMonad m => Int -> TimeSpec -> Rate -> Rate -> Gen (PrimState m) -> m (Tree Length Int)
- simulateNReconstructedTrees :: PrimMonad m => Int -> Int -> TimeSpec -> Rate -> Rate -> Gen (PrimState m) -> 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
.
Instances
(Eq a, Eq b) => Eq (PointProcess a b) Source # | |
Defined in ELynx.Tree.Simulate.PointProcess (==) :: PointProcess a b -> PointProcess a b -> Bool # (/=) :: PointProcess a b -> PointProcess a b -> Bool # | |
(Read a, Read b) => Read (PointProcess a b) Source # | |
Defined in ELynx.Tree.Simulate.PointProcess 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 showsPrec :: Int -> PointProcess a b -> ShowS # show :: PointProcess a b -> String # showList :: [PointProcess a b] -> ShowS # |
Tree height specification.
:: 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.
toReconstructedTree :: a -> PointProcess a Length -> Tree Length a Source #
Convert a point process to a reconstructed tree. See Lemma 2.2.
simulateReconstructedTree Source #
:: PrimMonad m | |
=> Int | Number of points (samples) |
-> TimeSpec | Time of origin or MRCA |
-> Rate | Birth rate |
-> Rate | Death rate |
-> Gen (PrimState m) | Generator (see |
-> 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.