BiobaseTurner- Import Turner RNA parameters

Safe HaskellNone




Turner file parser. Returns a Turner2004 data structure. Requires an annoying amount of boilerplate.

How is stack data stored:

AX UY -> ((A,U),(Y,X))

How iloop1x1 is stored:

X A G U C -> ((A,U),(C,G),X,Y) Y

Now iloop1x2 is stored:

X A G U C -> ((A,U),(C,G),X,C,Y), single (X) first, then 5' to 3' YC

iloop2x2 is stored:

XY A G U C -> ((A,U),(C,G),X,Y,y,x), X-->Y then x<--y xy

TODO not sure if dangle3/dangle5 are correctly split or if they should switch



fromDir :: FilePath -> Prefix -> Suffix -> IO Turner2004Source

Given a directory, fill in the Turner2004 data structure

d1_30 :: (Enum a, Num a) => [:. Z a]Source

Conduit stuff

values :: ByteString -> [Energy]Source

extract values. . - values are extracted as > 100k

parseTabulated :: Monad m => Sink ByteString m [(ByteString, Energy)]Source

Iteratee to parse tabulated loops (hairpins).

blockFromFile :: FilePath -> IO [Energy]Source

Convenience function

parseBlocks :: Monad m => Conduit ByteString m [Energy]Source

Transform input stream into list of list of doubles

parseMiscLoop :: Monad m => Sink ByteString m [[Double]]Source

Parses the miscloop table

NOTE extra brownie points for miscloop.dat for providing data in a form that does not conform to normal number encoding.

readD :: ByteString -> DoubleSource

Parses stupidly encoded values like .6 and -.0.

allEq :: Eq a => [a] -> BoolSource