Safe Haskell | None |
---|---|
Language | Haskell2010 |
Everything needed to wrap RNAfold
results, parse lines with RNAfold
input, fold a sequence with rnafold
, and more.
- data RNAfold = RNAfold {
- _sequenceID :: !ByteString
- _input :: !RNAseq
- _mfe :: !Folded
- _mfeFrequency :: !Double
- _ensemble :: !Folded
- _centroid :: !Folded
- _centroidDistance :: !Double
- _diversity :: !Double
- _temperature :: !(Maybe Double)
- temperature :: Getter RNAfold (Maybe Double)
- sequenceID :: Getter RNAfold ByteString
- mfeFrequency :: Getter RNAfold Double
- mfe :: Getter RNAfold Folded
- input :: Getter RNAfold RNAseq
- ensemble :: Getter RNAfold Folded
- diversity :: Getter RNAfold Double
- centroidDistance :: Getter RNAfold Double
- centroid :: Getter RNAfold Folded
- sequenceIDlens :: Lens' RNAfold ByteString
- rnafold :: RNAseq -> RNAfold
- data RNArewrite
- pRNAfold :: RNArewrite -> Double -> Parser RNAfold
- builderRNAfold :: RNAfold -> Builder
- module BioInf.ViennaRNA.Types
Documentation
Space-efficient RNAfold structure. RNAfold allows a DNA input, but this is not allowed in this data structure. If you want that, keep the original input string around.
This structure provides only Getter
's. Only the sequenceID
can be
updated via sequenceIDlens
. This is to prevent accidental updates of
fields that are actually interdependent.
Missing parts are sloppily encoded by bogus values and empty strings. All
Folded
structures and derived values are lazy. In case rnafold
was used
to construct the structure, calculations are deferred until needed.
TODO newtype the sequence id.
TODO temperature. How to encode? Kelvin? In BiobaseTypes! Could use (Nat)SciTypes!
TODO complete BP probability array
TODO lazy fields for computation on demand!
TODO Wrapped via Maybe
?
RNAfold | |
|
rnafold :: RNAseq -> RNAfold Source #
Fold a sequence.
This function is threadsafe via the viennaRNA-mutex.
TODO add temperature parameter
TODO consider creating a "super-lens" that updates whenever _input
or
_temperature
change.
data RNArewrite Source #
pRNAfold :: RNArewrite -> Double -> Parser RNAfold Source #
Parsing for RNAfold
. This should parse all variants that RNAfold
produces.
The parser for a Folded
structure has to deal with different "energy"
types. The different energies are bracketed by different types of brackets.
mfe (((...))) ( -1.20) ensemble (((...))) [ -1.41] centroid (((...))) { -1.20 d=1.06}
TODO Move into submodule.
TODO pipes-based streaming parser
TODO how to handle parsing the BP probability array, if known?
TODO I think it is possible to figure the line type based on the energy and the brackets around the energy.
builderRNAfold :: RNAfold -> Builder Source #
QuickCheck generator for RNAfold
. This is slightly unusual but allows
module BioInf.ViennaRNA.Types