Skip to content

Windowed predictions #9

@marcom

Description

@marcom

Following discussion in #7 (comment)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions