GenussFold-0.0.0.2: MCFGs for Genus-1 RNA Pseudoknots

Safe HaskellNone
LanguageHaskell2010

BioInf.GenussFold.PKN

Synopsis

Documentation

data SigPKN m s r t_c Source

Define signature and grammar

Constructors

SigPKN 

Fields

jux :: s -> t_c -> s -> t_c -> s
 
nil :: () -> s
 
nll :: (:.) ((:.) Z ()) () -> s
 
pk1 :: (:.) ((:.) Z s) () -> (:.) ((:.) Z t_c) () -> s -> (:.) ((:.) Z ()) s -> (:.) ((:.) Z ()) t_c -> s
 
pk2 :: (:.) ((:.) Z s) () -> (:.) ((:.) Z t_c) () -> s -> (:.) ((:.) Z ()) s -> (:.) ((:.) Z ()) t_c -> s
 
pse :: () -> () -> s -> s -> s
 
unp :: s -> t_c -> s
 
h :: Stream m s -> m r
 

Instances

(Monad mL0, Monad mR0, Eq xL0, (~) (* -> *) mL0 mR0, (~) * xL0 rL0) => ProductBacktracking (SigPKN mL xL rL t_c) (SigPKN mR xR rR t_c) 
type SigBacktracking (SigPKN mL0 xL0 rL0 t_c0) (SigPKN mR0 xR0 rR0 t_c0) = SigPKN mR0 (xL0, [xR0]) rR0 t_c0 

gPKN :: (Build b3, MkStream m ((:!:) ((:!:) ((:!:) ((:!:) S (Split "ss_UU_1627436531" Fragment b2)) (Split "ss_VV_1627436532" Fragment b1)) (Split "ss_UU_1627436531" Final b2)) (Split "ss_VV_1627436532" Final b1)) t2, MkStream m (Pair ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b2) t3, MkStream m (Pair ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b1) t4, MkStream m ((:!:) ((:!:) ((:!:) (Stack b3) b) b3) b) t2, MkStream m ((:!:) S Epsilon) t2, MkStream m ((:!:) (Stack b3) b) t2, MkStream m S t4, MkStream m S t3, Element ((:!:) ((:!:) ((:!:) ((:!:) S (Split "ss_UU_1627436531" Fragment b2)) (Split "ss_VV_1627436532" Fragment b1)) (Split "ss_UU_1627436531" Final b2)) (Split "ss_VV_1627436532" Final b1)) t2, Element (Pair ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b2) t3, Element (Pair ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b1) t4, Element ((:!:) ((:!:) ((:!:) (Stack b3) b) b3) b) t2, Element ((:!:) (Stack b3) b) t2, RuleContext t4, RuleContext t3, RuleContext t2, TermStaticVar (TermSymbol (TermSymbol M Deletion) b3) t4, TermStaticVar (TermSymbol (TermSymbol M Deletion) b3) t3, TermStaticVar (TermSymbol (TermSymbol M Deletion) b) t4, TermStaticVar (TermSymbol (TermSymbol M Deletion) b) t3, TermStaticVar (TermSymbol (TermSymbol M Epsilon) Epsilon) t4, TermStaticVar (TermSymbol (TermSymbol M Epsilon) Epsilon) t3, TerminalStream m (TermSymbol (TermSymbol M Deletion) b3) t4, TerminalStream m (TermSymbol (TermSymbol M Deletion) b3) t3, TerminalStream m (TermSymbol (TermSymbol M Deletion) b) t4, TerminalStream m (TermSymbol (TermSymbol M Deletion) b) t3, TerminalStream m (TermSymbol (TermSymbol M Epsilon) Epsilon) t4, TerminalStream m (TermSymbol (TermSymbol M Epsilon) Epsilon) t3, Apply ((:.) ((:.) (Arg ((:!:) ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b2)) (TermArg (TermSymbol (TermSymbol M Deletion) b3))) (TermArg (TermSymbol (TermSymbol M Deletion) b)) -> a), Apply ((:.) ((:.) (Arg ((:!:) ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b1)) (TermArg (TermSymbol (TermSymbol M Deletion) b3))) (TermArg (TermSymbol (TermSymbol M Deletion) b)) -> a), Apply (Arg ((:!:) ((:!:) ((:!:) (Stack b3) b) b3) b) -> a), Apply (Arg ((:!:) ((:!:) ((:!:) ((:!:) S (Split "ss_UU_1627436531" Fragment b2)) (Split "ss_VV_1627436532" Fragment b1)) (Split "ss_UU_1627436531" Final b2)) (Split "ss_VV_1627436532" Final b1)) -> a), Apply (Arg ((:!:) (Stack b3) b) -> a), (~) * (Fun ((:.) ((:.) (Arg ((:!:) ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b2)) (TermArg (TermSymbol (TermSymbol M Deletion) b3))) (TermArg (TermSymbol (TermSymbol M Deletion) b)) -> a)) ((:.) ((:.) Z a) () -> (:.) ((:.) Z t1) () -> a -> (:.) ((:.) Z ()) a -> (:.) ((:.) Z ()) t1 -> a), (~) * (Fun ((:.) ((:.) (Arg ((:!:) ((:!:) ((:!:) S (TermSymbol (TermSymbol M b3) Deletion)) (TermSymbol (TermSymbol M b) Deletion)) b1)) (TermArg (TermSymbol (TermSymbol M Deletion) b3))) (TermArg (TermSymbol (TermSymbol M Deletion) b)) -> a)) ((:.) ((:.) Z a) () -> (:.) ((:.) Z t1) () -> a -> (:.) ((:.) Z ()) a -> (:.) ((:.) Z ()) t1 -> a), (~) * (Fun (Arg ((:!:) ((:!:) ((:!:) (Stack b3) b) b3) b) -> a)) (a -> t1 -> a -> t1 -> a), (~) * (Fun (Arg ((:!:) ((:!:) ((:!:) ((:!:) S (Split "ss_UU_1627436531" Fragment b2)) (Split "ss_VV_1627436532" Fragment b1)) (Split "ss_UU_1627436531" Final b2)) (Split "ss_VV_1627436532" Final b1)) -> a)) (() -> () -> a -> a -> a), (~) * (Fun (Arg ((:!:) (Stack b3) b) -> a)) (a -> t1 -> a)) => SigPKN m a t t1 -> ((t2 -> t2 -> m t) -> b3) -> ((t3 -> t3 -> m t) -> b2) -> ((t4 -> t4 -> m t) -> b1) -> b -> (:.) ((:.) ((:.) Z b3) b2) b1 Source

pretty :: Monad m => SigPKN m [String] [[String]] Char Source

TODO It could be beneficial to introduce type Splitted = Either String (String,String) or something isomorphic. While [String] works, it allows for too many possibilities here! ([] ist lightweight, on the other hand ...)

pknPairMax :: Int -> String -> (Int, [[String]]) Source

[{]}(())
caguagcu
[ ]
 { }
    (())