The RNAwolf folding algorithm, version 1.9. We now have full stacking and rich parameters everywhere. In general, most parameters closely follow what we have for ViennaRNA 1.8 but with extended RNA secondary structures, instead of canonicals only. Further refinements of the parameter system will follow.

TODO right now, 1-diagrams only, 2-diagrams come back in a few days. I want to be sure that the full stacking approach does not introduce subtle bugs.

TODO recast all fZZZ functions for folding to actually fuse on minimum/fZZZ.

TODO VU.! -> VU.unsafeIndex

TODO possibly very big TODO: is this being optimized? : fold $ g z where g z = if z==True then [1..10] else []. If this is not optimized, we should change all functions below in a way that allows optimization. (I dont think fusion can fire on these objects...)

TODO rewrite minimumVU to accept Either ctors and specialize on them. Left to be used for strange errors, Right for correct streams

- rnaWolf :: Params -> Primary -> Tables
- rnaWolfBacktrack :: Params -> Primary -> Double -> Tables -> [([ExtPairIdx], Double)]
- rnaWolfOptimal :: Tables -> Double

# Documentation

rnaWolfBacktrack :: Params -> Primary -> Double -> Tables -> [([ExtPairIdx], Double)]Source

Given parameters, input, score band, and filled tables we can backtrack.

NOTE the order in which backtracking for individual functions is performed, is important. In case of ties in energy, the first result is taken. This should be considered!

- 1
- We consider unpaired stretches always first. This is kind of arbitrary.
- 2
- extended stems always come last. This is because they can potentially introduce many co-optimal structures before they are all discarded.

TODO all the crap in comments are bug-fix backtracking options.

rnaWolfOptimal :: Tables -> DoubleSource

Return the optimal energy.