J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  DAn array holding information for one extended pair and two unpaired  nucleotides, closes a loop. AAn array holding information for two extended pairs, e.g. stems. 4An array holding information for one extended pair. BThis is an experimental annotation for long-distance interactions An array which encodes length information  A (very) rich set of paramters. DTODO 1xn interior loops should be tested (how often do they occur?) TODO external loop  (    %Cast a list of values to parameters. LNOTE This operation is rather fragile if there are layout changes. Consider  Repr for this. MNOTE BIG FAT WARNING: BE ABSOLUTELY SURE THAT ALL IMPORTS AND EXPORTS FOLLOW I THIS ORDERING EXACTLY, OTHERWISE KEYS WILL BE MAPPED TO WRONG POSITIONS 1 DURING LOOKUP AND VALUES END UP SOMEWHERE ELSE. ,split up a list accordings to given lengths Just a long list of doubles. * !"#$%&'()*+,-./0123456789:;<=>?@ABC!Should really go into BiobaseXNA !Should really go into BiobaseXNA . !"#$%&'()*+,-./0123456789:;<=>?@ABC*CBA@?>=<;89:567234/01,-.)*+&'(#$% !"* !"!"#$%$%&'('()*+*+,-.-./0101234345676789:9:;<=>?@ABCD>The outer closing pair of a bulge loop (one unpaired region). EOuter part of a normal bulge F/The loop-part of bulges. Increases speed by 2x G!Index generator for bulged loops Backtrack the bulge loop part. H5Inner part of a bulge to speed up bulge calculations I$Backtrack the inner part of a bulge DEFGHIDEFGHIDEFGHIJ9An external loop with an unpaired nucleotide to the left KBBacktracking a structure with an unpaired nucleotide to the left. JFIXME In btLeftUnpaired, allow only non-empty structures on the right. It ? would be nice to make the recursion scheme take care of that. L%Energy for exactly one stem at (i,k) M'Backtrack one stem with right index k. NGThis one is important as otherwise, some stretches of nucleotides will F always have to be paired. (Obviously, I forgot to add this one for a  time...) OPIExternal structures with more than one stem have a NStem on the left and + an external NExtn structure on the right. Q>Backtracking of an external structure with more than one stem JKLMNOPQJKLMNOPQJKLMNOPQRIA hairpin is a number of 0 or more unpaired nucleotides, enclosed by the  nucleotides (i,j) which pair. LTODO should we allow hairpins with no unpaired nucleotides in the pin? They F do occur, but only under special circumstances which we should model  differently... TODO re-allow IMI SBacktracking hairpins. RSRSRSTKThe outer part of an interior loop. Given a certain basepair type, add the  cost from the unpaired part. UV6Performs the interior loop calculations between (i,j) outer and (k,l)  innerE part. The score based on the unpaired nucleotides is independent of . both, the outer and the inner basepair type. NOTE /G TODO -- fusion enabled for this function (due to it taking 50% of the H time), full fusion is still dependent on other factors and needs to be : checked (in particular, we still have allocation events) W#Backtrack the unpaired loop region XJThis opens up an interior loop. For each index (i,j) we minimize over all  possible basepair types. Y@Backtrack from an NInte result to the corresponding EStem parts ZJSince backtracking interior loops is mostly selfcontained, we encapsulate * the above three functions -- which we can't do easily with the forward 8 calculations as they actually have to save on runtime. DGiven the outer indices (i,j), produces delta_i and delta_j so that 0 i+delta_i and j-delta_j are the inner indices. Z should fuse I and should make sure that l-k>=4 is always true (maxd). Furthermore the A maximal unpaired length of both sides combined is determined by . TODO better name than  TUVWXYZTUVWXYZTUVWXYZ [DEnergy for having the rightmost nucleotide (at j) unpaired in NMBr. \6Backtrack in NMbr if the nucleotide at j is unpaired. ]EEnergy for having the rightmost nucleotide (at j) unpaired in NMBr1. ^4Backtrack NMbr1 if the nucleotide at j is unpaired. _FA multibranched helix (except the closing one). (i,j) are closed by a D basepair. Backtracking into the EStem reveals the type of pairing. `@Backtracks from (i,j) in NMult into the extended-pairing EStem. aCloses a multibranch loop. 'TODO make completely triplet compliant bFBacktrack from and extended annotation (ij,ext) into the helper table  NMultLoop. c1Multibranched loop helper function that combines at least one stem with  exactly one stem1 but does not add the closing energy from (i,j). d%Backtracking the multibranched loop. eJBacktrack a single stem in NMbr, where the stem has zero or more unpaired  nucleotides to the left. f1Backtrack by trying to find a multilooped helix. gHAdd a stem to a multibranch table containing already at least one stem. hCBacktrack by finding the splitting index between an NMbr composite M structure and a single multibranched stem NMult (which can contain unpaired  nucleotides to the left). iHAdd a single stem to a multibranch table containing zero stems already. ,TODO this would be equal to mlHelix, unify! jKBacktrack a single stem closed at (i,j) for NMbr1. Takes the route through , NMult which solves for the exact pairtype. [\]^_`abcdefghij[\]^_`abcdefghij[\]^_`abcdefghij kKA normal stem is created by taking the minimum over all possible basepairs  of the extended stem. l:Backtrack from a normal stem back into the extended stem. mKA stem is extended by another pair. The score contribution is dependent on K the previous pair. Note that for score lookup purposes, the inner pair is  switched. nStem backtracking. klmnklmnklmn o Wrapper around the state monad. ?Folding magic. In principle, this is not more complicated than  Nussinov-style folding. pIGiven parameters, input, score band, and filled tables we can backtrack. LNOTE the order in which backtracking for individual functions is performed, J is important. In case of ties in energy, the first result is taken. This  should be considered!  1I We consider unpaired stretches always first. This is kind of arbitrary. 2G extended stems always come last. This is because they can potentially E introduce many co-optimal structures before they are all discarded. @TODO all the crap in comments are bug-fix backtracking options. qReturn the optimal energy. opqopqopq r A list of named parameters. Uniquely tag each key MNOTE BIG FAT WARNING: BE ABSOLUTELY SURE THAT ALL IMPORTS AND EXPORTS FOLLOW I THIS ORDERING EXACTLY, OTHERWISE KEYS WILL BE MAPPED TO WRONG POSITIONS 1 DURING LOOKUP AND VALUES END UP SOMEWHERE ELSE. stuvwxyz{|}~ Training data to feature vector #transform feature to 0-based index $Map param keys to thei Int-indices. 'And back from Int-indices to the keys. KTakes a primary structure and secondary structure tree and produces a list  of keys. TODO Data.Traversable ?! ETODO better handling of unknown features: we can have genuine errors A (pseudoknots) and uncoded features (e.g. hairpins of size > 30) $Create the secondary structure tree CFIXME okPairs is ad-hoc, we should allow for other kinds of pairs! rstuvwxyz{|}~r~}|{zyxwvutsr~}|{zyxwvutsstuvwxyz{|}~ Default implementation of P/A. -In case that the known structure has a score epsilon better than the J predicted, we have an error condition, as this should never be the case. APull in the statistical interface. From the confusion matrix, we ' automagically get everything we need. ?NOTE Unfortunately, StatisticalMethods has heavy dependencies.  !"#$%&'())*++,--.//011233455677899:;;<==>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ _ ` a b c d e f g h i j k l m n o p P Q q r s t u v w x y z { | } ~        RNAwolf-0.3.1.0 BioInf.ParamsBioInf.Params.ImportBioInf.Params.ExportBioInf.RNAwolf.TypesBioInf.RNAwolf.BulgeBioInf.RNAwolf.ExternBioInf.RNAwolf.HairpinBioInf.RNAwolf.InteriorBioInf.RNAwolf.MultibranchedBioInf.RNAwolf.StemBioInf.RNAwolf BioInf.KeysBioInf.PassiveAggressiveBioInf.RNAwolf.TripletBulgeBioInf.RNAwolf.TripletStem PaExtPairNN Pa2ExtPairs PaExtPair PaDistancePaLengthParams hairpinLength hairpinClosestem stemTripletinteriorLength interiorAsym interiorClose bulgeLength bulgeTriplet bulgeClosembClose multiBranched multiHelix multiUnpaired pairDistance interMolInitfromListsplitXstoList NMultLoop unMultLoopNExtnunNExtnNMbr1unNMbr1NMbrunNMbr NBulgLoop unBulgLoopNBulgunNBulgNMultunNMult NInteLoop unNInteLoopNInteunNInteNStemunNStemEStemunEStemTablesFeatures ExtFeaturesBaseFExtTableTableBTAnswerNBTExtBT fBulgeOuter btBulgeOuter fBulgeLoop btBulgeLoop fBulgeInner btBulgeInner fLeftUnpairedbtLeftUnpairedfStembtStemfOnebtOnefStemsbtStemsfHairpin btHairpinfInteriorOuterbtInteriorOuter fInteriorLoopbtInteriorLoopfInteriorInnerbtInteriorInner fInteriorKLsfUnpairedRightbtUnpairedRightfUnpairedRight1btUnpairedRight1fMlHelix btMlHelixfMlClose btMlClosefMlLoopbtMlLoopfMlStembtMlStemfMlStems btMlStemsfMl1Stem btMl1StemfNstembtNstemrnaWolfrnaWolfBacktrackrnaWolfOptimalKeys InterMolInit PairDistance MultiUnpaired MultiHelix MultiBranchedMbClose BulgeClose BulgeTriplet BulgeLength InteriorClose InteriorAsymInteriorLength StemTripletStem HairpinClose HairpinLength featureVectorlookupFeatureIndextreeToFeaturesssTree defaultPA maxLength maxDistance minExtPair maxExtPair min2ExtPairs max2ExtPairs minExtPairNN maxExtPairNN minTriplet maxTriplet zeroParams zeroLength zeroDistance zeroExtPair zero2ExtPairs zeroExtPairNN zeroTripletnewDtestDwshcitrfBulgeLoopIndicesiltrcfoldST paramsKeyskvsvks$fMkConfusionMatrixTrainingDataerrorKnownTooGood