RNAlib-2.4.14
Local (sliding window) Partition Function and Equilibrium Probabilities

Scanning version using a sliding window approach to compute equilibrium probabilities. More...

Detailed Description

Scanning version using a sliding window approach to compute equilibrium probabilities.

+ Collaboration diagram for Local (sliding window) Partition Function and Equilibrium Probabilities:

Modules

 Deprecated Interface for Local (Sliding Window) Partition Function Computation
 

Files

file  part_func_window.h
 Partition function and equilibrium probability implementation for the sliding window algorithm.
 

Macros

#define VRNA_EXT_LOOP   1U
 Exterior loop.
 
#define VRNA_HP_LOOP   2U
 Hairpin loop.
 
#define VRNA_INT_LOOP   4U
 Internal loop.
 
#define VRNA_MB_LOOP   8U
 Multibranch loop.
 
#define VRNA_ANY_LOOP   (VRNA_EXT_LOOP | VRNA_HP_LOOP | VRNA_INT_LOOP | VRNA_MB_LOOP)
 Any loop.
 
#define VRNA_PROBS_WINDOW_BPP   4096U
 Trigger base pairing probabilities. More...
 
#define VRNA_PROBS_WINDOW_UP   8192U
 Trigger unpaired probabilities. More...
 
#define VRNA_PROBS_WINDOW_STACKP   16384U
 Trigger base pair stack probabilities. More...
 
#define VRNA_PROBS_WINDOW_UP_SPLIT   32768U
 Trigger detailed unpaired probabilities split up into different loop type contexts. More...
 
#define VRNA_PROBS_WINDOW_PF   65536U
 Trigger partition function. More...
 

Typedefs

typedef void( vrna_probs_window_callback) (FLT_OR_DBL *pr, int pr_size, int i, int max, unsigned int type, void *data)
 Sliding window probability computation callback. More...
 

Basic local partition function interface

int vrna_probs_window (vrna_fold_compound_t *fc, int ulength, unsigned int options, vrna_probs_window_callback *cb, void *data)
 Compute various equilibrium probabilities under a sliding window approach. More...
 

Simplified global partition function computation using sequence(s) or multiple sequence alignment(s)

vrna_ep_tvrna_pfl_fold (const char *sequence, int window_size, int max_bp_span, float cutoff)
 Compute base pair probabilities using a sliding-window approach. More...
 
int vrna_pfl_fold_cb (const char *sequence, int window_size, int max_bp_span, vrna_probs_window_callback *cb, void *data)
 Compute base pair probabilities using a sliding-window approach (callback version) More...
 
double ** vrna_pfl_fold_up (const char *sequence, int ulength, int window_size, int max_bp_span)
 Compute probability of contiguous unpaired segments. More...
 
int vrna_pfl_fold_up_cb (const char *sequence, int ulength, int window_size, int max_bp_span, vrna_probs_window_callback *cb, void *data)
 Compute probability of contiguous unpaired segments. More...
 

Macro Definition Documentation

#define VRNA_PROBS_WINDOW_BPP   4096U

#include <ViennaRNA/part_func_window.h>

Trigger base pairing probabilities.

Passing this flag to vrna_probs_window() activates callback execution for base pairing probabilities. In turn, the corresponding callback receives this flag through the type argument whenever base pairing probabilities are provided.

Detailed information for the algorithm to compute unpaired probabilities can be taken from [1].

See also
vrna_probs_window()
#define VRNA_PROBS_WINDOW_UP   8192U

#include <ViennaRNA/part_func_window.h>

Trigger unpaired probabilities.

Passing this flag to vrna_probs_window() activates callback execution for unpaired probabilities. In turn, the corresponding callback receives this flag through the type argument whenever unpaired probabilities are provided.

Detailed information for the algorithm to compute unpaired probabilities can be taken from [4].

See also
vrna_probs_window()
#define VRNA_PROBS_WINDOW_STACKP   16384U

#include <ViennaRNA/part_func_window.h>

Trigger base pair stack probabilities.

Passing this flag to vrna_probs_window() activates callback execution for stacking probabilities. In turn, the corresponding callback receives this flag through the type argument whenever stack probabilities are provided.

Bug:
Currently, this flag is a placeholder doing nothing as the corresponding implementation for stack probability computation is missing.
See also
vrna_probs_window()
#define VRNA_PROBS_WINDOW_UP_SPLIT   32768U

#include <ViennaRNA/part_func_window.h>

Trigger detailed unpaired probabilities split up into different loop type contexts.

Passing this flag to vrna_probs_window() activates callback execution for unpaired probabilities. In contrast to VRNA_PROBS_WINDOW_UP this flag requests unpaired probabilities to be split up into different loop type contexts. In turn, the corresponding callback receives the VRNA_PROBS_WINDOW_UP flag OR-ed together with the corresponding loop type, i.e.:

See also
vrna_probs_window(), VRNA_PROBS_WINDOW_UP
#define VRNA_PROBS_WINDOW_PF   65536U

#include <ViennaRNA/part_func_window.h>

Trigger partition function.

Passing this flag to vrna_probs_window() activates callback execution for partition function. In turn, the corresponding callback receives this flag through it's type argument whenever partition function data is provided.

Note
Instead of actually providing the partition function $Z$, the callback is always provided with the corresponding enemble free energy $\Delta G = - RT \ln Z$.
See also
vrna_probs_window()

Typedef Documentation

typedef void( vrna_probs_window_callback) (FLT_OR_DBL *pr, int pr_size, int i, int max, unsigned int type, void *data)

#include <ViennaRNA/part_func_window.h>

Sliding window probability computation callback.

Notes on Callback Functions:
This function will be called for each probability data set in the sliding window probability computation implementation of vrna_probs_window(). The argument type specifies the type of probability that is passed to this function.

Types:

The above types usually come exclusively. However, for unpaired probabilities, the VRNA_PROBS_WINDOW_UP flag is OR-ed together with one of the loop type contexts

to indicate the particular type of data available through the pr pointer.

See also
vrna_probs_window(), vrna_pfl_fold_up_cb()
Parameters
prAn array of probabilities
pr_sizeThe length of the probability array
iThe i-position (5') of the probabilities
maxThe (theoretical) maximum length of the probability array
typeThe type of data that is provided
dataAuxiliary data

Function Documentation

int vrna_probs_window ( vrna_fold_compound_t fc,
int  ulength,
unsigned int  options,
vrna_probs_window_callback cb,
void *  data 
)

#include <ViennaRNA/part_func_window.h>

Compute various equilibrium probabilities under a sliding window approach.

This function applies a sliding window scan for the sequence provided with the argument fc and reports back equilibrium probabilities through the callback function cb. The data reported to the callback depends on the options flag.

Note
The parameter ulength only affects computation and resulting data if unpaired probability computations are requested through the options flag.

Options:

Options may be OR-ed together

See also
vrna_pfl_fold_cb(), vrna_pfl_fold_up_cb()
Parameters
fcThe fold compound with sequence data, model settings and precomputed energy parameters
ulengthThe maximal length of an unpaired segment (only for unpaired probability computations)
cbThe callback function which collects the pair probability data for further processing
dataSome arbitrary data structure that is passed to the callback cb
optionsOption flags to control the behavior of this function
Returns
0 on failure, non-zero on success
vrna_ep_t* vrna_pfl_fold ( const char *  sequence,
int  window_size,
int  max_bp_span,
float  cutoff 
)

#include <ViennaRNA/part_func_window.h>

Compute base pair probabilities using a sliding-window approach.

This is a simplified wrapper to vrna_probs_window() that given a nucleid acid sequence, a window size, a maximum base pair span, and a cutoff value computes the pair probabilities for any base pair in any window. The pair probabilities are returned as a list and the user has to take care to free() the memory occupied by the list.

Note
This function uses default model settings! For custom model settings, we refer to the function vrna_probs_window().
In case of any computation errors, this function returns NULL
See also
vrna_probs_window(), vrna_pfl_fold_cb(), vrna_pfl_fold_up()
Parameters
sequenceThe nucleic acid input sequence
window_sizeThe size of the sliding window
max_bp_spanThe maximum distance along the backbone between two nucleotides that form a base pairs
cutoffA cutoff value that omits all pairs with lower probability
Returns
A list of base pair probabilities, terminated by an entry with vrna_ep_t.i and vrna_ep_t.j set to 0
int vrna_pfl_fold_cb ( const char *  sequence,
int  window_size,
int  max_bp_span,
vrna_probs_window_callback cb,
void *  data 
)

#include <ViennaRNA/part_func_window.h>

Compute base pair probabilities using a sliding-window approach (callback version)

This is a simplified wrapper to vrna_probs_window() that given a nucleid acid sequence, a window size, a maximum base pair span, and a cutoff value computes the pair probabilities for any base pair in any window. It is similar to vrna_pfl_fold() but uses a callback mechanism to return the pair probabilities.

Read the details for vrna_probs_window() for details on the callback implementation!

Note
This function uses default model settings! For custom model settings, we refer to the function vrna_probs_window().
See also
vrna_probs_window(), vrna_pfl_fold(), vrna_pfl_fold_up_cb()
Parameters
sequenceThe nucleic acid input sequence
window_sizeThe size of the sliding window
max_bp_spanThe maximum distance along the backbone between two nucleotides that form a base pairs
cbThe callback function which collects the pair probability data for further processing
dataSome arbitrary data structure that is passed to the callback cb
Returns
0 on failure, non-zero on success
double** vrna_pfl_fold_up ( const char *  sequence,
int  ulength,
int  window_size,
int  max_bp_span 
)

#include <ViennaRNA/part_func_window.h>

Compute probability of contiguous unpaired segments.

This is a simplified wrapper to vrna_probs_window() that given a nucleic acid sequence, a maximum length of unpaired segments (ulength), a window size, and a maximum base pair span computes the equilibrium probability of any segment not exceeding ulength. The probabilities to be unpaired are returned as a 1-based, 2-dimensional matrix with dimensions $ N \times M $, where $N$ is the length of the sequence and $M$ is the maximum segment length. As an example, the probability of a segment of size 5 starting at position 100 is stored in the matrix entry $X[100][5]$.

It is the users responsibility to free the memory occupied by this matrix.

Note
This function uses default model settings! For custom model settings, we refer to the function vrna_probs_window().
Parameters
sequenceThe nucleic acid input sequence
ulengthThe maximal length of an unpaired segment
window_sizeThe size of the sliding window
max_bp_spanThe maximum distance along the backbone between two nucleotides that form a base pairs
Returns
The probabilities to be unpaired for any segment not exceeding ulength
int vrna_pfl_fold_up_cb ( const char *  sequence,
int  ulength,
int  window_size,
int  max_bp_span,
vrna_probs_window_callback cb,
void *  data 
)

#include <ViennaRNA/part_func_window.h>

Compute probability of contiguous unpaired segments.

This is a simplified wrapper to vrna_probs_window() that given a nucleic acid sequence, a maximum length of unpaired segments (ulength), a window size, and a maximum base pair span computes the equilibrium probability of any segment not exceeding ulength. It is similar to vrna_pfl_fold_up() but uses a callback mechanism to return the unpaired probabilities.

Read the details for vrna_probs_window() for details on the callback implementation!

Note
This function uses default model settings! For custom model settings, we refer to the function vrna_probs_window().
Parameters
sequenceThe nucleic acid input sequence
ulengthThe maximal length of an unpaired segment
window_sizeThe size of the sliding window
max_bp_spanThe maximum distance along the backbone between two nucleotides that form a base pairs
cbThe callback function which collects the pair probability data for further processing
dataSome arbitrary data structure that is passed to the callback cb
Returns
0 on failure, non-zero on success