For sliding window predictions on a sequence that produce an array of results instead of just one (one result for each window).
To use windowed predictions we have to do the following:
call vrna_fold_compound() with option VRNA_OPTION_WINDOW
set the window size set with vrna_md_t.window_size
use the functions vrna_mfe_window_cb, vrna_mfe_window_zscore_cb, vrna_probs_window
A Julia interface could look like this:
mfe_window(cb::Function, fc::FoldCompound, ...)
mfe_window(fc::FoldCompound, ...)
probs_window(cb::Function, fc::FoldCompound, ...)
probs_window(fc::FoldCompound, ...)
With the callback function in the first position so we can use do-notation to pass custom callback functions.
The second version of each function without the callback just stores all the results in an array and returns that (by calling the first version with a callback that pushes each result to an array).
This style of callback function would also be something useful for subopt, pbacktrack, and maybe other functions where ViennaRNA accepts callback functions.
Following discussion in https://github.com/marcom/ViennaRNA.jl/issues/7#issuecomment-1173719544
For sliding window predictions on a sequence that produce an array of results instead of just one (one result for each window).
To use windowed predictions we have to do the following:
vrna_fold_compound()
with optionVRNA_OPTION_WINDOW
vrna_md_t.window_size
vrna_mfe_window_cb
,vrna_mfe_window_zscore_cb
,vrna_probs_window
A Julia interface could look like this:
mfe_window(cb::Function, fc::FoldCompound, ...)
mfe_window(fc::FoldCompound, ...)
probs_window(cb::Function, fc::FoldCompound, ...)
probs_window(fc::FoldCompound, ...)
With the callback function in the first position so we can use do-notation to pass custom callback functions. The second version of each function without the callback just stores all the results in an array and returns that (by calling the first version with a callback that pushes each result to an array).
This style of callback function would also be something useful for
subopt
,pbacktrack
, and maybe other functions where ViennaRNA accepts callback functions.