elynx-seq-0.1.0: Handle molecular sequences

Copyright(c) Dominik Schrempf 2019
LicenseGPL-3
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Data.MarkovProcess.MixtureModel

Contents

Description

Creation date: Tue Jan 29 19:17:40 2019.

To be imported qualified.

Synopsis

Types

type Weight = Double Source #

Mixture model component weight.

data Component Source #

A mixture model component has a weight and a substitution model.

Getters

getAlphabet :: MixtureModel -> Alphabet Source #

Get alphabet used with mixture model. Throws error if components use different Alphabets.

getWeights :: MixtureModel -> [Weight] Source #

Get weights.

Building mixture models

fromSubstitutionModels :: Name -> [Weight] -> [SubstitutionModel] -> MixtureModel Source #

Create a mixture model from a list of substitution models.

Transformations

concatenate :: Name -> [MixtureModel] -> MixtureModel Source #

Concatenate mixture models.

scale :: Double -> MixtureModel -> MixtureModel Source #

Scale all substitution models of the mixture model.

normalize :: MixtureModel -> MixtureModel Source #

Globally normalize a mixture model so that on average one event happens per unit time.

appendName :: Name -> MixtureModel -> MixtureModel Source #

Append byte string to all substitution models of mixture model.

Tests

isValid :: MixtureModel -> Bool Source #

Checks if a mixture model is valid.

XXX: For the future, a proper way of creating mixture models might be of interest. For example, not exporting the constructor nor the record fields and providing an algebraic way of creating mixture models (empty and addComponent which performs necessary checks).

Output

summarizeComponent :: Component -> [ByteString] Source #

Summarize a mixture model component; lines to be printed to screen or log.

summarize :: MixtureModel -> [ByteString] Source #

Summarize a mixture model; lines to be printed to screen or log.