Safe Haskell | None |
---|---|
Language | Haskell2010 |
Wrappers for structural data. Encoded as bytestrings. This differs from
BiobaseXNA
, where specialized encodings are used. These structures are
supposedly "short", they need to fit into a strict bytestring.
TODO Consider where to move each type. There are merge possibilities between BiobaseXNA and BiobaseTypes.
- newtype RNAss = RNAss {
- _rnass :: ByteString
- rnass :: Iso' RNAss ByteString
- newtype RNAensembleStructure = RNAes {
- _rnaes :: ByteString
- rnaes :: Iso' RNAensembleStructure ByteString
- data RNAds = RNAds {
- _rnadsL :: !ByteString
- _rnadsR :: !ByteString
- rnadsR :: Lens' RNAds ByteString
- rnadsL :: Lens' RNAds ByteString
- rnads :: Prism' ByteString RNAds
- rnads2rnassPair :: Iso' RNAds (RNAss, RNAss)
- mkRNAds :: (Monad m, MonadError RNAStructureError m) => ByteString -> m RNAds
- data RNAStructureError = RNAStructureError {}
- verifyRNAss :: (Monad m, MonadError RNAStructureError m) => RNAss -> m RNAss
- newtype RNApset = RNApset {}
- rnapset :: Iso' RNApset (Set (Int, Int))
- rnassPairSet :: MonadError String m => RNAss -> m RNApset
- rnassPairSet' :: RNAss -> RNApset
- pairDist :: RNApset -> RNApset -> Int
Documentation
Secondary structure using ()
for paired elements, and .
for unpaired
ones. It is assumed that the ()
match up. These structures from a Monoid.
newtype RNAensembleStructure Source #
Ensemble structure encoding. *Very* different type ctor name chosen! The structure of this string makes verification much more complicated.
TODO describe encoding used by RNAfold for the ensemble string.
Cofolded structure.
RNAds | |
|
rnads2rnassPair :: Iso' RNAds (RNAss, RNAss) Source #
Isomorphism from RNAds
to (RNAss,RNAss)
. The RNAss
are only
legal if taken both: rnassFromDimer . both
.
mkRNAds :: (Monad m, MonadError RNAStructureError m) => ByteString -> m RNAds Source #
Try to create a dimeric structure.
data RNAStructureError Source #
Capture what might be wrong with the RNAss.
verifyRNAss :: (Monad m, MonadError RNAStructureError m) => RNAss -> m RNAss Source #
Verifies that the given RNAss is properly formatted. Otherwise, error out.
TODO Implement! Check with BiobaseXNA and the stack effort in there. This
might influence if the verification goes into BiobaseXNA and happens via an
Iso'
.
rnassPairSet :: MonadError String m => RNAss -> m RNApset Source #
Transform an RNAss
into a set of base pairs (i,j)
. The pairs are
0-based.
rnassPairSet' :: RNAss -> RNApset Source #
RNA pair set, but a transformation error calls error
.