elynx-markov-0.5.0: Simulate molecular sequences along trees
Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Data.MarkovProcess.SubstitutionModel

Description

Creation date: Tue Jan 29 19:10:46 2019.

To be imported qualified.

Synopsis

Types

type Name = String Source #

Name of substitution model; abstracted and subject to change.

type Params = [Double] Source #

Parameters of substitution model. May be the empty list.

data SubstitutionModel Source #

Complete definition of a substitution model. Create instances with substitutionModel. A substitution model has an alphabet, a name, and a list of parameters (e.g., the kappa value for the HKY model). Further, the transition rate matrix is defined by a stationary distribution and a set of exchangeabilities.

Accessors

params :: SubstitutionModel -> Params Source #

List of parameters

rateMatrix :: SubstitutionModel -> RateMatrix Source #

Calculate rate matrix from substitution model.

totalRate :: SubstitutionModel -> Double Source #

Get scale of substitution model.

Building substitution models

Transformations

scale :: Double -> SubstitutionModel -> SubstitutionModel Source #

Scale the rate of a substitution model by given factor.

normalize :: SubstitutionModel -> SubstitutionModel Source #

Normalize a substitution model, so that, on average, one substitution happens per unit time.