Safe Haskell | Safe-Infered |
---|
Types for RNA secondary structure. Types vary from the simplest array (D1Secondary) to rather complex ones.
TODO The complex ones are still coming in from other libraries.
TODO can we use Char8 instead of Char?
TODO prepare for extended RNA secondary structures!
- newtype D1Secondary = D1S {}
- newtype D2Secondary = D2S {
- unD2S :: Vector ((Int, Edge, CTisomerism), (Int, Edge, CTisomerism))
- class MkD1Secondary a where
- mkD1S :: a -> D1Secondary
- fromD1S :: D1Secondary -> a
- class MkD2Secondary a where
- mkD2S :: a -> D2Secondary
- fromD2S :: D2Secondary -> a
- data SSTree idx a
- d1sTree :: D1Secondary -> SSTree PairIdx ()
- d2sTree :: D2Secondary -> SSTree ExtPairIdx ()
- d2Compare :: (Ord t2, Ord t3) => ((t2, t3), t) -> ((t2, t3), t1) -> Ordering
- d2Grouping :: (Ord a1, Ord a) => ((a, a1), t) -> ((a, a1), t1) -> Bool
- test :: (Int, [ExtPairIdx])
- test' :: [((Int, Int), (CTisomerism, Edge, Edge))]
- dotBracket :: [String] -> String -> [(Int, Int)]
Documentation
newtype D1Secondary Source
RNA secondary structure with 1-diagrams. Each nucleotide is paired with at most one other nucleotide. A nucleotide with index k in [0..len-1] is paired if unD1S VU.! k > 0.
Eq D1Secondary | |
Read D1Secondary | |
Show D1Secondary | |
MkD2Secondary D1Secondary | Conversion between D1S and D2S is lossy in D2S -> D1S TODO |
newtype D2Secondary Source
D2S | |
|
Eq D2Secondary | |
Read D2Secondary | |
Show D2Secondary | |
MkD1Secondary D2Secondary | Conversion between D1S and D2S is lossy in D2S -> D1S |
class MkD1Secondary a whereSource
mkD1S :: a -> D1SecondarySource
fromD1S :: D1Secondary -> aSource
MkD1Secondary String | A fast instance for getting the pair list of vienna-structures. |
MkD1Secondary D2Secondary | Conversion between D1S and D2S is lossy in D2S -> D1S |
MkD1Secondary (Vector Char) | |
MkD1Secondary (Int, [PairIdx]) | (Length,List of Pairs) |
MkD1Secondary ([String], String) | A second primitive generator, requiring dictionary and String. This one generates pairs that are then used by the above instance. The dict is a list of possible brackets: [()] being the minimal set. NOTE no dictionary is returned by fromD1S. TODO return dictionary that is actually seen? |
MkD1Secondary ([String], Vector Char) | Generate Secondary given that we have an unboxed vector of characters |
class MkD2Secondary a whereSource
mkD2S :: a -> D2SecondarySource
fromD2S :: D2Secondary -> aSource
MkD2Secondary D1Secondary | Conversion between D1S and D2S is lossy in D2S -> D1S TODO |
MkD2Secondary (Int, [ExtPairIdx]) |
Tree-based representation
A secondary-structure tree. Has no notion of pseudoknots.
d1sTree :: D1Secondary -> SSTree PairIdx ()Source
Create a tree from (pseudoknot-free [not checked]) 1-diagrams.
d2sTree :: D2Secondary -> SSTree ExtPairIdx ()Source
Create a tree from (pseudoknot-free [not checked]) 2-diagrams.
d2Grouping :: (Ord a1, Ord a) => ((a, a1), t) -> ((a, a1), t1) -> BoolSource
test :: (Int, [ExtPairIdx])Source