Safe Haskell | None |
---|

This program compares two Infernal covariance models with each other. Based on the Infernal CM scoring mechanism, a Link sequence and Link score are calculated. The Link sequence is defined as the sequence scoring highest in both models simultanuously.

The complete algorithm is described in:

http://bioinformatics.oxfordjournals.org/content/26/18/i453.long

NOTE always use coverage analysis to find out, if we really used all code paths (in long models, if a path is not taken, there is a bug)

- type Opt a = (CM -> StateID -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> (Char, Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> a -> a -> a, [(a, a)] -> [(a, a)], a -> String)
- cykMaxiMin :: Opt BitScore
- rnaString :: Bool -> Opt [Char]
- dotBracket :: Bool -> Opt String
- visitedNodes :: Opt [NodeID]
- extendedOutput :: Opt String
- (<*>) :: Eq a => Opt a -> Opt b -> Opt (a, b)
- recurse :: Bool -> Opt a -> CM -> CM -> Array (StateID, StateID) [(a, a)]

# optimization functions

type Opt a = (CM -> StateID -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> a -> a, CM -> StateID -> BitScore -> (Char, Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> BitScore -> (Char, BitScore) -> a -> a, CM -> StateID -> a -> a -> a, [(a, a)] -> [(a, a)], a -> String)Source

Type of the optimization functions.

cykMaxiMin :: Opt BitScoreSource

Calculates the cyk optimal score over both models.

rnaString :: Bool -> Opt [Char]Source

Return the nucleotide sequence leading to the score. uses an optional endmarker to denote end states. the string is the same for both models. this is the only Opt function, currently, for which this is true.

dotBracket :: Bool -> Opt StringSource

Dotbracket notation, again with an endmarker, to see the secondary structure corresponding to the rnastring.

visitedNodes :: Opt [NodeID]Source

Show the nodes which were visited to get the score. the last node can occur multiple times. if it does, local end transitions were used.

extendedOutput :: Opt StringSource

Detailed output of the different states, that were visited.