RNAwolf-0.3.0.2: RNA folding with non-canonical basepairs and base-triplets.

BioInf.Keys

Description

Transformation of predictions and known structures into keys. Keys are used for linearization.

NOTE READ THE BIG FAT KEYS WARNING

TODO Generalize and move into its own library

Synopsis

Documentation

data Keys Source

A list of named parameters.

Uniquely tag each key

NOTE BIG FAT WARNING: BE ABSOLUTELY SURE THAT ALL IMPORTS AND EXPORTS FOLLOW THIS ORDERING EXACTLY, OTHERWISE KEYS WILL BE MAPPED TO WRONG POSITIONS DURING LOOKUP AND VALUES END UP SOMEWHERE ELSE.

Instances

featureVector :: String -> [ExtPairIdx] -> [Int]Source

Training data to feature vector

lookupFeatureIndex :: Keys -> IntSource

transform feature to 0-based index

treeToFeatures :: (MkPrimary a, Show a) => a -> SSTree ExtPairIdx t -> [Keys]Source

Map param keys to thei Int-indices.

And back from Int-indices to the keys.

Takes a primary structure and secondary structure tree and produces a list of keys.

TODO Data.Traversable ?!

TODO better handling of unknown features: we can have genuine errors (pseudoknots) and uncoded features (e.g. hairpins of size > 30)

ssTree :: Int -> [ExtPairIdx] -> SSTree ExtPairIdx ()Source

Create the secondary structure tree

FIXME okPairs is ad-hoc, we should allow for other kinds of pairs!