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 |
Creation date: Tue Jan 29 19:10:46 2019.
To be imported qualified.
Synopsis
- type Name = String
- type Params = [Double]
- data SubstitutionModel
- alphabet :: SubstitutionModel -> Alphabet
- name :: SubstitutionModel -> Name
- params :: SubstitutionModel -> Params
- stationaryDistribution :: SubstitutionModel -> StationaryDistribution
- exchangeabilityMatrix :: SubstitutionModel -> ExchangeabilityMatrix
- rateMatrix :: SubstitutionModel -> RateMatrix
- totalRate :: SubstitutionModel -> Double
- data Normalize
- substitutionModel :: Alphabet -> Name -> Params -> Normalize -> StationaryDistribution -> ExchangeabilityMatrix -> SubstitutionModel
- scale :: Double -> SubstitutionModel -> SubstitutionModel
- normalize :: SubstitutionModel -> SubstitutionModel
- appendName :: Name -> SubstitutionModel -> SubstitutionModel
Types
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.
Instances
Read SubstitutionModel Source # | |
Defined in ELynx.MarkovProcess.SubstitutionModel | |
Show SubstitutionModel Source # | |
Defined in ELynx.MarkovProcess.SubstitutionModel showsPrec :: Int -> SubstitutionModel -> ShowS # show :: SubstitutionModel -> String # showList :: [SubstitutionModel] -> ShowS # |
Accessors
alphabet :: SubstitutionModel -> Alphabet Source #
Alphabet
name :: SubstitutionModel -> Name Source #
Name
params :: SubstitutionModel -> Params Source #
List of parameters
stationaryDistribution :: SubstitutionModel -> StationaryDistribution Source #
Stationary distribution
exchangeabilityMatrix :: SubstitutionModel -> ExchangeabilityMatrix Source #
Exchangeability matrix
rateMatrix :: SubstitutionModel -> RateMatrix Source #
Calculate rate matrix from substitution model.
totalRate :: SubstitutionModel -> Double Source #
Get scale of substitution model.
Building substitution models
Should the substitution model be normalized?
substitutionModel :: Alphabet -> Name -> Params -> Normalize -> StationaryDistribution -> ExchangeabilityMatrix -> SubstitutionModel Source #
Create normalized SubstitutionModel
. See normalize
.
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.
appendName :: Name -> SubstitutionModel -> SubstitutionModel Source #
Abbend to name.