Safe Haskell | None |
---|
Strict, scalar nussinov78 algorithm.
- nussinov78 :: MkPrimary a => a -> [Backtrace]
- nussinov78Fill :: Primary -> ST s (Arr0 DIM2 Int)
- fillTable :: PrimMonad m => MArr0 (PrimState m) DIM2 Int -> (DIM2 -> m Int) -> m ()
- base' :: Primary -> DIM2 -> Scalar Nuc
- empty :: DIM2 -> Scalar Bool
- nil :: Bool -> Int
- left :: Nuc -> Int -> Int
- right :: Int -> Nuc -> Int
- pair :: Nuc -> Int -> Nuc -> Int
- split :: Int -> Int -> Int
- basepair :: MkViennaPair (t, t1) => t -> t1 -> Bool
- h :: (Monad m, Ord a) => Stream m a -> m a
- type Backtrace = (Int, String)
- nussinov78BT :: Primary -> Arr0 DIM2 Int -> [Backtrace]
Documentation
nussinov78 :: MkPrimary a => a -> [Backtrace]Source
Simple RNA folding with basepair maximization.
fillTable :: PrimMonad m => MArr0 (PrimState m) DIM2 Int -> (DIM2 -> m Int) -> m ()Source
Fill the single table with values in an orderly fashion. The order in which we fill depends on the algorithm.
base' :: Primary -> DIM2 -> Scalar NucSource
Request the single character enclosed by (i,i+1), with i+1==j
left :: Nuc -> Int -> IntSource
A single nucleotide to the left. Note that x is monadic. In nussinov
we are in the ST monad, here we just know that we are in a monad.
basepair :: MkViennaPair (t, t1) => t -> t1 -> BoolSource
Determine if two characters form a legal basepair.
h :: (Monad m, Ord a) => Stream m a -> m aSource
the grammar makes sure that we at least have nil in the stream