Biobase-0.1.0.1: Base library for bioinformatics

Biobase.Infernal.CM

Contents

Synopsis

Data types for Covariance Models

data CM n s Source

A complete covariance model. Each node and each state can be tagged with additional data. Typically, say after parsing, the tag will be ().

Instances

(Show n, Show s) => Show (CM n s) 

data Node n Source

Describes one node

Constructors

Node 

Fields

nid :: Int
 
ntype :: NodeType
 
nparents :: [Int]
 
nchildren :: [Int]
 
nstates :: [Int]
 
ntag :: n
 

Instances

Show n => Show (Node n) 

data State s Source

One state

Constructors

State 

Fields

sid :: Int
 
stype :: StateType
 
snode :: Int
 
sparents :: [Int]
 
schildren :: [Transition]
 
semission :: [Emission]
 
stag :: s
 

Instances

Show s => Show (State s) 

data CMType Source

CMType is important if we want to set localBegin / localEnd!

Constructors

CMProb 
CMScore 

Instances

data Emission Source

can emit either one nucleotide or a pair

Constructors

EmitS 

Fields

eNuc :: Nucleotide
 
escore :: Double
 
EmitP 

Instances

data Transition Source

branches are transition without attached probability becaue both branches are always taken

Constructors

Branch 

Fields

tchild :: Int
 
Transition 

Fields

tchild :: Int
 
tscore :: Double
 

Instances

data NodeType Source

the different node types

Constructors

MATP 
MATL 
MATR 
BIF 
ROOT 
BEGL 
BEGR 
END 

data StateType Source

the different state types

Constructors

MP 
IL 
IR 
D 
ML 
MR 
B 
S 
E 

make a local model out of a global one

cmMakeLocal :: Double -> Double -> CM n s -> CM n sSource

generate a local model with local begin prob and local end prob

cmMakeLocalEnd :: Double -> CM n s -> CM n sSource

Transform between score and probability mode

cmScore2Prob :: CM n s -> CM n sSource

given a CM in score mode, change it to probability mode

cmProb2Score :: CM n s -> CM n sSource

Given a CM in prob mode, change to score mode

cmNormalizeProbabilities :: CM n s -> CM n sSource

normalize all PROBabilities in a CM

Helper Functions

nodeMainState :: CM n s -> Node n -> State sSource

extract the main state for each node (eg MP state for MATP node)

localBeginPossible :: CM n s -> Node n -> BoolSource

Checks for each node, if it can be target of a local begin.

localEndPossible :: CM n s -> Node n -> BoolSource

Checks for each node if it can lead to a local end.

stateScore2Prob :: CM n s -> State s -> State sSource

transform scores into probabilities, given a nullmodel for x

back into scores

Transform a state, setting probabilities instead of scores. Requires CM knowledge for background model.

stateProb2Score :: CM n s -> State s -> State sSource

Transform a state, setting scores instead of probabilities.