BiobaseTurner- Import Turner RNA parameters

Safe HaskellSafe-Infered




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

Iteratee stuff

eneeBlocks :: (Functor m, Monad m) => Enumeratee ByteString [[Double]] m aSource

Transform input stream into list of list of doubles

values :: ByteString -> [Double]Source

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

iTabulated :: (Functor m, Monad m) => Iteratee ByteString m [(ByteString, Double)]Source

Iteratee to parse tabulated loops (hairpins).

blockFromFile :: FilePath -> IO [Double]Source

Convenience function

iMiscLoop :: (Functor m, Monad m) => Iteratee ByteString m [[Double]]Source

Parses the miscloop table

NOTO 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