RNAlib-2.4.14
|
|
Functions to draw random structure samples from the ensemble according to their equilibrium probability. More...
Functions to draw random structure samples from the ensemble according to their equilibrium probability.
Modules | |
Stochastic Backtracking of Structures from Distance Based Partitioning | |
Contains functions related to stochastic backtracking from a specified distance class. | |
Deprecated Interface for Stochastic Backtracking | |
Macros | |
#define | VRNA_PBACKTRACK_DEFAULT 0 |
Boltzmann sampling flag indicating default backtracing mode. More... | |
#define | VRNA_PBACKTRACK_NON_REDUNDANT 1 |
Boltzmann sampling flag indicating non-redundant backtracing mode. More... | |
Typedefs | |
typedef void( | vrna_boltzmann_sampling_callback) (const char *stucture, void *data) |
Callback for Boltzmann sampling. More... | |
typedef struct vrna_pbacktrack_memory_s * | vrna_pbacktrack_mem_t |
Boltzmann sampling memory data structure. More... | |
Functions | |
char * | vrna_pbacktrack5 (vrna_fold_compound_t *fc, unsigned int length) |
Sample a secondary structure of a subsequence from the Boltzmann ensemble according its probability. More... | |
char ** | vrna_pbacktrack5_num (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, unsigned int options) |
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability. More... | |
unsigned int | vrna_pbacktrack5_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, vrna_boltzmann_sampling_callback *cb, void *data, unsigned int options) |
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability. More... | |
char ** | vrna_pbacktrack5_resume (vrna_fold_compound_t *vc, unsigned int num_samples, unsigned int length, vrna_pbacktrack_mem_t *nr_mem, unsigned int options) |
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability. More... | |
unsigned int | vrna_pbacktrack5_resume_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, vrna_boltzmann_sampling_callback *cb, void *data, vrna_pbacktrack_mem_t *nr_mem, unsigned int options) |
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability. More... | |
char * | vrna_pbacktrack (vrna_fold_compound_t *fc) |
Sample a secondary structure from the Boltzmann ensemble according its probability. More... | |
char ** | vrna_pbacktrack_num (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int options) |
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability. More... | |
unsigned int | vrna_pbacktrack_cb (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_boltzmann_sampling_callback *cb, void *data, unsigned int options) |
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability. More... | |
char ** | vrna_pbacktrack_resume (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_pbacktrack_mem_t *nr_mem, unsigned int options) |
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability. More... | |
unsigned int | vrna_pbacktrack_resume_cb (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_boltzmann_sampling_callback *cb, void *data, vrna_pbacktrack_mem_t *nr_mem, unsigned int options) |
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability. More... | |
void | vrna_pbacktrack_mem_free (vrna_pbacktrack_mem_t s) |
Release memory occupied by a Boltzmann sampling memory data structure. More... | |
#define VRNA_PBACKTRACK_DEFAULT 0 |
#include <ViennaRNA/boltzmann_sampling.h>
Boltzmann sampling flag indicating default backtracing mode.
#define VRNA_PBACKTRACK_NON_REDUNDANT 1 |
#include <ViennaRNA/boltzmann_sampling.h>
Boltzmann sampling flag indicating non-redundant backtracing mode.
This flag will turn the Boltzmann sampling into non-redundant backtracing mode along the lines of Michalik et al. 2017 [18]
typedef void( vrna_boltzmann_sampling_callback) (const char *stucture, void *data) |
#include <ViennaRNA/boltzmann_sampling.h>
Callback for Boltzmann sampling.
structure | The secondary structure in dot-bracket notation |
data | Some arbitrary, auxiliary data address as provided to the calling function |
typedef struct vrna_pbacktrack_memory_s* vrna_pbacktrack_mem_t |
#include <ViennaRNA/boltzmann_sampling.h>
Boltzmann sampling memory data structure.
This structure is required for properly resuming a previous sampling round in specialized Boltzmann sampling, such as non-redundant backtracking.
Initialize with NULL
and pass its address to the corresponding functions vrna_pbacktrack5_resume(), etc.
char * vrna_pbacktrack5 | ( | vrna_fold_compound_t * | fc, |
unsigned int | length | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Sample a secondary structure of a subsequence from the Boltzmann ensemble according its probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a secondary structure. The parameter length
specifies the length of the substructure starting from the 5' end.
The structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
length | The length of the subsequence to consider (starting with 5' end) |
char ** vrna_pbacktrack5_num | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
unsigned int | length, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures. The parameter length
specifies the length of the substructure starting from the 5' end.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
length | The length of the subsequence to consider (starting with 5' end) |
options | A bitwise OR-flag indicating the backtracing mode. |
options
is optional with default value options = VRNA_PBACKTRACK_DEFAULT
. See also Python Examples - Boltzmann Sampling unsigned int vrna_pbacktrack5_cb | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
unsigned int | length, | ||
vrna_boltzmann_sampling_callback * | cb, | ||
void * | data, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures. The parameter length
specifies the length of the substructure starting from the 5' end.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack5() and vrna_pbacktrack5_num() this function yields the structure samples through a callback mechanism.
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
length | The length of the subsequence to consider (starting with 5' end) |
cb | The callback that receives the sampled structure |
data | A data structure passed through to the callback cb |
options | A bitwise OR-flag indicating the backtracing mode. |
options
is optional with default value options = VRNA_PBACKTRACK_DEFAULT
. See also Python Examples - Boltzmann Sampling char ** vrna_pbacktrack5_resume | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
unsigned int | length, | ||
vrna_pbacktrack_mem_t * | nr_mem, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures. The parameter length
specifies the length of the substructure starting from the 5' end.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack5_cb() this function allows for resuming a previous sampling round in specialized Boltzmann sampling, such as non-redundant backtracking. For that purpose, the user passes the address of a Boltzmann sampling data structure (vrna_pbacktrack_mem_t) which will be re-used in each round of sampling, i.e. each successive call to vrna_pbacktrack5_resume_cb() or vrna_pbacktrack5_resume().
A successive sample call to this function may look like:
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
length | The length of the subsequence to consider (starting with 5' end) |
nr_mem | The address of the Boltzmann sampling memory data structure |
options | A bitwise OR-flag indicating the backtracing mode. |
nr_mem
data structure as first element. See also Python Examples - Boltzmann Sampling unsigned int vrna_pbacktrack5_resume_cb | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
unsigned int | length, | ||
vrna_boltzmann_sampling_callback * | cb, | ||
void * | data, | ||
vrna_pbacktrack_mem_t * | nr_mem, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples for a subsequence from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures. The parameter length
specifies the length of the substructure starting from the 5' end.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack5_resume() this function yields the structure samples through a callback mechanism.
A successive sample call to this function may look like:
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
length | The length of the subsequence to consider (starting with 5' end) |
cb | The callback that receives the sampled structure |
data | A data structure passed through to the callback cb |
nr_mem | The address of the Boltzmann sampling memory data structure |
options | A bitwise OR-flag indicating the backtracing mode. |
nr_mem
data structure as first element. See also Python Examples - Boltzmann Sampling char * vrna_pbacktrack | ( | vrna_fold_compound_t * | fc | ) |
#include <ViennaRNA/boltzmann_sampling.h>
Sample a secondary structure from the Boltzmann ensemble according its probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a secondary structure.
The structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
char ** vrna_pbacktrack_num | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
options | A bitwise OR-flag indicating the backtracing mode. |
options
is optional with default value options = VRNA_PBACKTRACK_DEFAULT
. See also Python Examples - Boltzmann Sampling unsigned int vrna_pbacktrack_cb | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
vrna_boltzmann_sampling_callback * | cb, | ||
void * | data, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack() and vrna_pbacktrack_num() this function yields the structure samples through a callback mechanism.
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
cb | The callback that receives the sampled structure |
data | A data structure passed through to the callback cb |
options | A bitwise OR-flag indicating the backtracing mode. |
options
is optional with default value options = VRNA_PBACKTRACK_DEFAULT
. See also Python Examples - Boltzmann Sampling char ** vrna_pbacktrack_resume | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
vrna_pbacktrack_mem_t * | nr_mem, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack_cb() this function allows for resuming a previous sampling round in specialized Boltzmann sampling, such as non-redundant backtracking. For that purpose, the user passes the address of a Boltzmann sampling data structure (vrna_pbacktrack_mem_t) which will be re-used in each round of sampling, i.e. each successive call to vrna_pbacktrack_resume_cb() or vrna_pbacktrack_resume().
A successive sample call to this function may look like:
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
nr_mem | The address of the Boltzmann sampling memory data structure |
options | A bitwise OR-flag indicating the backtracing mode. |
nr_mem
data structure as first element. See also Python Examples - Boltzmann Sampling unsigned int vrna_pbacktrack_resume_cb | ( | vrna_fold_compound_t * | fc, |
unsigned int | num_samples, | ||
vrna_boltzmann_sampling_callback * | cb, | ||
void * | data, | ||
vrna_pbacktrack_mem_t * | nr_mem, | ||
unsigned int | options | ||
) |
#include <ViennaRNA/boltzmann_sampling.h>
Obtain a set of secondary structure samples from the Boltzmann ensemble according their probability.
Perform a probabilistic (stochastic) backtracing in the partition function DP arrays to obtain a set of num_samples
secondary structures.
Any structure with free energy
is picked from the Boltzmann distributed ensemble according to its probability
with partition function , Boltzmann constant
and thermodynamic temperature
.
Using the options
flag one can switch between regular (VRNA_PBACKTRACK_DEFAULT) backtracing mode, and non-redundant sampling (VRNA_PBACKTRACK_NON_REDUNDANT) along the lines of Michalik et al. 2017 [18].
In contrast to vrna_pbacktrack5_resume() this function yields the structure samples through a callback mechanism.
A successive sample call to this function may look like:
fc
with vrna_fold_compound() or similar. This can be done easily by passing vrna_fold_compound() a model details parameter with vrna_md_t.uniq_ML = 1. fc | The fold compound data structure |
num_samples | The size of the sample set, i.e. number of structures |
cb | The callback that receives the sampled structure |
data | A data structure passed through to the callback cb |
nr_mem | The address of the Boltzmann sampling memory data structure |
options | A bitwise OR-flag indicating the backtracing mode. |
nr_mem
data structure as first element. See also Python Examples - Boltzmann Sampling void vrna_pbacktrack_mem_free | ( | vrna_pbacktrack_mem_t | s | ) |
#include <ViennaRNA/boltzmann_sampling.h>
Release memory occupied by a Boltzmann sampling memory data structure.
s | The non-redundancy memory data structure |