MutationOrder-0.0.0.2: Most likely order of mutation events in RNA

Safe HaskellNone
LanguageHaskell2010

BioInf.MutationOrder.RNA

Description

Here we collect the necessary data structures for the RNAs to be compared. This data is serialized to disk once calculated, since it is most likely the part that takes longest.

TODO if the vienna wrapper allows, we should parallelize the calculations.

TODO nice interface counting up?

Synopsis

Documentation

data RNA Source #

A single RNA with pre-calculated elements.

All calculations are done at 37 C.

TODO include the basepair probability matrix? Can we "compress" that one?

We do not encode D1S into the json

Constructors

RNA 

Fields

Instances

Eq RNA Source # 

Methods

(==) :: RNA -> RNA -> Bool #

(/=) :: RNA -> RNA -> Bool #

Show RNA Source # 

Methods

showsPrec :: Int -> RNA -> ShowS #

show :: RNA -> String #

showList :: [RNA] -> ShowS #

Generic RNA Source # 

Associated Types

type Rep RNA :: * -> * #

Methods

from :: RNA -> Rep RNA x #

to :: Rep RNA x -> RNA #

ToJSON RNA Source # 
FromJSON RNA Source # 
Serialize RNA Source # 

Methods

put :: Putter RNA #

get :: Get RNA #

NFData RNA Source # 

Methods

rnf :: RNA -> () #

type Rep RNA Source # 

mkRNA Source #

Arguments

:: Maybe (HashMap ByteString QLine) 
-> ByteString

primary sequence of the *origin* RNA

-> Vector (Int, Char)

set of mutations compared to the origin

-> RNA 

Given the primary sequence and the mutation set, fill the RNA structure.

NOTE This wraps some ViennaRNA-bindings calls that are in IO.

TODO check if these calls are *really* thread-safe!

insertMutations :: Vector (Int, Char) -> ByteString -> ByteString Source #

Insert a set of mutations in a ByteString.

data Landscape Source #

Constructors

Landscape 

Fields

Instances

Eq Landscape Source # 
Show Landscape Source # 
Generic Landscape Source # 

Associated Types

type Rep Landscape :: * -> * #

ToJSON Landscape Source # 
FromJSON Landscape Source # 
Serialize Landscape Source # 
NFData Landscape Source # 

Methods

rnf :: Landscape -> () #

type Rep Landscape Source # 

createRNAlandscape :: Maybe (HashMap ByteString QLine) -> Bool -> ByteString -> ByteString -> (Landscape, [(Int, ByteString)]) Source #

TODO prime candidate for parallelization. ViennaRNA-bindings currently does not allow parallel runs! It would be possible to consider externalizing this, but for now we just run single-threaded.

toFile :: FilePath -> Landscape -> IO () Source #

Write a generated landscape to disk.