Safe Haskell | Safe-Infered |
---|
A set of energy functions that are modelled after the ViennaRNA package, Version 2 (with d=2).
As part of the design, we could have (i) either continued giving many parameters or (ii) have fewer parameters that require input of the (Primary,Index,Index) type. Since the compilation speed of the grammars using these functions depends on the number of arguments (in case (i) compilation takes minutes!), this approach has benefits for testing the fusion library.
This means compilation is a lot faster, but runtime is not 2.8x
slower but
3.5x
slower.
- hairpinF :: Vienna2004 -> (Nuc :!: Nuc) -> ((Primary :!: Int) :!: Int) -> (Nuc :!: Nuc) -> Int
- tinyloopF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> Int
- bulgeLF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> (Nuc :!: Nuc) -> Int
- bulgeRF :: Vienna2004 -> (Nuc :!: Nuc) -> Int -> ((Primary :!: Int) :!: Int) -> Int
- iloopN1F :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> Int
- iloop1NF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> Int
- iloopIF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> Int
- iloopOF :: Vienna2004 -> (Nuc :!: Nuc) -> Int -> (Nuc :!: Nuc) -> Int
- multiIF :: Vienna2004 -> Int -> Int -> Int
- multiOF :: Vienna2004 -> (Nuc :!: Nuc) -> Int -> (Nuc :!: Nuc) -> Int
- regionStemF :: Vienna2004 -> Nuc -> Int -> Int
- justStemF :: Vienna2004 -> (Nuc :!: Nuc) -> Int -> (Nuc :!: Nuc) -> Int
- bsF :: Int -> Int -> Int
- rSF :: Nuc -> Int -> Int
- bcF :: Int -> Int -> Int
- ssF :: Int -> Int
- cmF :: Int -> Int -> Int
- nilF :: Bool -> Int
- iD :: a -> a
- h :: Monad m => Stream m Int -> m Int
- terminalAU :: Num a => a -> ViennaPair -> a
Documentation
hairpinF :: Vienna2004 -> (Nuc :!: Nuc) -> ((Primary :!: Int) :!: Int) -> (Nuc :!: Nuc) -> IntSource
Hairpin structures. Hairpins with less than 3 unpaired nucleotides are forbidden.
NOTE (xs,i,j)
is indeed *only* the unpaired stretch. Hence, the length is
j-i+1
, as given.
TODO Activate tabulated hairpin structures.
tinyloopF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> IntSource
Tiny loops are small interior loops. This includes canonical stacks without any unpaired nucleotides, and small, tabulated interior loops.
bulgeLF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> (Nuc :!: Nuc) -> IntSource
A left bulge (....[[...]])
which four unpaired nucleotides in the bulge.
the left bulge ls
will be given six nucleotides (note, ls
is the
complete input, use li
and lj
as the first and last included nucleotide
index), the two outer ones being for the outer and inner loop. On the right,
we have rp
and r
which are nucleotides. ls!(Z:.li)
and r
form the
outer Vienna pair. rp
and ls!(Z:.lj)
form the inner pair.
bulgeRF :: Vienna2004 -> (Nuc :!: Nuc) -> Int -> ((Primary :!: Int) :!: Int) -> IntSource
A right bulge ([[...]]....)
. See bulgeLF
for how this works.
iloopN1F :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> IntSource
An interior loop with N
unpaired nucleotides to the left and 1
unpaired nucleotide to the right. The regions ls
and rs
each have 2
nucleotides more than are unpaired. These first and last nucleotides form
the last paired or first pairs in the stacks around the loop.
iloop1NF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> IntSource
1xN interior loops.
iloopIF :: Vienna2004 -> ((Primary :!: Int) :!: Int) -> Int -> ((Primary :!: Int) :!: Int) -> IntSource
regionStemF :: Vienna2004 -> Nuc -> Int -> IntSource
terminalAU :: Num a => a -> ViennaPair -> aSource