Functions and data structures for secondary structure soft constraints. More…
// typedefs typedef struct vrna_sc_s vrna_sc_t typedef int () vrna_callback_sc_energy ( int i, int j, int k, int l, unsigned char d, void *data ) typedef FLT_OR_DBL () vrna_callback_sc_exp_energy ( int i, int j, int k, int l, unsigned char d, void *data ) typedef vrna_basepair_t* () vrna_callback_sc_backtrack ( int i, int j, int k, int l, unsigned char d, void *data ) // structs struct vrna_sc_s // global functions void vrna_sc_init (vrna_fold_compound_t* vc) void vrna_sc_set_bp ( vrna_fold_compound_t* vc, const FLT_OR_DBL** constraints, unsigned int options ) void vrna_sc_add_bp ( vrna_fold_compound_t* vc, int i, int j, FLT_OR_DBL energy, unsigned int options ) void vrna_sc_set_up ( vrna_fold_compound_t* vc, const FLT_OR_DBL* constraints, unsigned int options ) void vrna_sc_add_up ( vrna_fold_compound_t* vc, int i, FLT_OR_DBL energy, unsigned int options ) void vrna_sc_remove (vrna_fold_compound_t* vc) void vrna_sc_free (vrna_sc_t* sc) void vrna_sc_add_data ( vrna_fold_compound_t* vc, void* data, vrna_callback_free_auxdata* free_data ) void vrna_sc_add_f ( vrna_fold_compound_t* vc, vrna_callback_sc_energy* f ) void vrna_sc_add_bt ( vrna_fold_compound_t* vc, vrna_callback_sc_backtrack* f ) void vrna_sc_add_exp_f ( vrna_fold_compound_t* vc, vrna_callback_sc_exp_energy* exp_f )
typedef int () vrna_callback_sc_energy ( int i, int j, int k, int l, unsigned char d, void *data )
This is the prototype for callback functions used by the folding recursions to evaluate generic soft constraints. The first four parameters passed indicate the delimiting nucleotide positions of the decomposition, and the parameter denotes
the decomposition step. The last parameter data
is the auxiliary data structure associated to the hard constraints via vrna_sc_add_data() , or NULL if no auxiliary data was added.
Notes on Callback Functions This callback enables one to add (pseudo-)energy contributions to individual decompositions of the secondary structure.
Parameters:
i | Left (5’) delimiter position of substructure |
j | Right (3’) delimiter position of substructure |
k | Left delimiter of decomposition |
l | Right delimiter of decomposition |
d | Decomposition step indicator |
data | Auxiliary data |
Returns:
Pseudo energy contribution in deka-kalories per mol
See also:
VRNA_DECOMP_PAIR_HP , VRNA_DECOMP_PAIR_IL , VRNA_DECOMP_PAIR_ML , VRNA_DECOMP_ML_ML_ML , VRNA_DECOMP_ML_STEM , VRNA_DECOMP_ML_ML , VRNA_DECOMP_ML_UP , VRNA_DECOMP_ML_ML_STEM , VRNA_DECOMP_ML_COAXIAL , VRNA_DECOMP_EXT_EXT , VRNA_DECOMP_EXT_UP , VRNA_DECOMP_EXT_STEM , VRNA_DECOMP_EXT_EXT_EXT , VRNA_DECOMP_EXT_STEM_EXT , VRNA_DECOMP_EXT_EXT_STEM , VRNA_DECOMP_EXT_EXT_STEM1 , vrna_sc_add_f() , vrna_sc_add_exp_f() , vrna_sc_add_bt() , vrna_sc_add_data()
typedef FLT_OR_DBL () vrna_callback_sc_exp_energy ( int i, int j, int k, int l, unsigned char d, void *data )
This is the prototype for callback functions used by the partition function recursions to evaluate generic soft constraints. The first four parameters passed indicate the delimiting nucleotide positions of the decomposition, and the parameter denotes
the decomposition step. The last parameter data
is the auxiliary data structure associated to the hard constraints via vrna_sc_add_data() , or NULL if no auxiliary data was added.
Notes on Callback Functions This callback enables one to add (pseudo-)energy contributions to individual decompositions of the secondary structure (Partition function variant, i.e. contributions must be returned as Boltzmann factors).
Parameters:
i | Left (5’) delimiter position of substructure |
j | Right (3’) delimiter position of substructure |
k | Left delimiter of decomposition |
l | Right delimiter of decomposition |
d | Decomposition step indicator |
data | Auxiliary data |
Returns:
Pseudo energy contribution in deka-kalories per mol
See also:
VRNA_DECOMP_PAIR_HP , VRNA_DECOMP_PAIR_IL , VRNA_DECOMP_PAIR_ML , VRNA_DECOMP_ML_ML_ML , VRNA_DECOMP_ML_STEM , VRNA_DECOMP_ML_ML , VRNA_DECOMP_ML_UP , VRNA_DECOMP_ML_ML_STEM , VRNA_DECOMP_ML_COAXIAL , VRNA_DECOMP_EXT_EXT , VRNA_DECOMP_EXT_UP , VRNA_DECOMP_EXT_STEM , VRNA_DECOMP_EXT_EXT_EXT , VRNA_DECOMP_EXT_STEM_EXT , VRNA_DECOMP_EXT_EXT_STEM , VRNA_DECOMP_EXT_EXT_STEM1 , vrna_sc_add_exp_f() , vrna_sc_add_f() , vrna_sc_add_bt() , vrna_sc_add_data()
typedef vrna_basepair_t* () vrna_callback_sc_backtrack ( int i, int j, int k, int l, unsigned char d, void *data )
Notes on Callback Functions This callback enables one to add auxiliary base pairs in the backtracking steps of hairpin- and interior loops.
Parameters:
i | Left (5’) delimiter position of substructure |
j | Right (3’) delimiter position of substructure |
k | Left delimiter of decomposition |
l | Right delimiter of decomposition |
d | Decomposition step indicator |
data | Auxiliary data |
Returns:
List of additional base pairs
See also:
VRNA_DECOMP_PAIR_HP , VRNA_DECOMP_PAIR_IL , VRNA_DECOMP_PAIR_ML , VRNA_DECOMP_ML_ML_ML , VRNA_DECOMP_ML_STEM , VRNA_DECOMP_ML_ML , VRNA_DECOMP_ML_UP , VRNA_DECOMP_ML_ML_STEM , VRNA_DECOMP_ML_COAXIAL , VRNA_DECOMP_EXT_EXT , VRNA_DECOMP_EXT_UP , VRNA_DECOMP_EXT_STEM , VRNA_DECOMP_EXT_EXT_EXT , VRNA_DECOMP_EXT_STEM_EXT , VRNA_DECOMP_EXT_EXT_STEM , VRNA_DECOMP_EXT_EXT_STEM1 , vrna_sc_add_bt() , vrna_sc_add_f() , vrna_sc_add_exp_f() , vrna_sc_add_data()
void vrna_sc_init (vrna_fold_compound_t* vc)
This function adds a proper soft constraints data structure to the vrna_fold_compound_t data structure. If soft constraints already exist within the fold compound, they are removed.
SWIG Wrapper Notes This function is attached as method sc_init() to objects of type fold_compound
Parameters:
vc | The vrna_fold_compound_t where an empty soft constraint feature is to be added to |
Note
Accepts vrna_fold_compound_t of type VRNA_FC_TYPE_SINGLE and VRNA_FC_TYPE_COMPARATIVE
See also:
vrna_sc_set_bp() , vrna_sc_set_up() , vrna_sc_add_SHAPE_deigan() , vrna_sc_add_SHAPE_zarringhalam() , vrna_sc_remove() , vrna_sc_add_f() , vrna_sc_add_exp_f() , vrna_sc_add_pre(), vrna_sc_add_post()
void vrna_sc_set_bp ( vrna_fold_compound_t* vc, const FLT_OR_DBL** constraints, unsigned int options )
SWIG Wrapper Notes This function is attached as method sc_set_bp() to objects of type fold_compound
Parameters:
vc | The vrna_fold_compound_t the soft constraints are associated with |
constraints | A two-dimensional array of pseudo free energies in :math:` kcal / mol ` |
options | The options flag indicating how/where to store the soft constraints |
Note
This function replaces any pre-exisitng soft constraints with the ones supplied in constraints
.
See also:
void vrna_sc_add_bp ( vrna_fold_compound_t* vc, int i, int j, FLT_OR_DBL energy, unsigned int options )
SWIG Wrapper Notes This function is attached as an overloaded method sc_add_bp() to objects of type fold_compound . The method either takes arguments for a single base pair (i,j) with the corresponding energy value:
fold_compound.sc_add_bp(i, j, energy, options)
or an entire 2-dimensional matrix with dimensions n x n that stores free energy contributions for any base pair (i,j) with :math:` 1 leq i < j leq n ` :
fold_compound.sc_add_bp(matrix, options)
In both variants, the options
argument is optional can may be omitted.
Parameters:
vc | The vrna_fold_compound_t the soft constraints are associated with |
i | The 5’ position of the base pair the soft constraint is added for |
j | The 3’ position of the base pair the soft constraint is added for |
energy | The free energy (soft-constraint) in :math:` kcal / mol ` |
options | The options flag indicating how/where to store the soft constraints |
See also:
void vrna_sc_set_up ( vrna_fold_compound_t* vc, const FLT_OR_DBL* constraints, unsigned int options )
SWIG Wrapper Notes This function is attached as method sc_set_up() to objects of type fold_compound
Parameters:
vc | The vrna_fold_compound_t the soft constraints are associated with |
constraints | A vector of pseudo free energies in :math:` kcal / mol ` |
options | The options flag indicating how/where to store the soft constraints |
Note
This function replaces any pre-exisitng soft constraints with the ones supplied in constraints
.
See also:
void vrna_sc_add_up ( vrna_fold_compound_t* vc, int i, FLT_OR_DBL energy, unsigned int options )
SWIG Wrapper Notes This function is attached as an overloaded method sc_add_up() to objects of type fold_compound . The method either takes arguments for a single nucleotide :math:`i ` with the corresponding energy value:
fold_compound.sc_add_up(i, energy, options)
or an entire vector that stores free energy contributions for each nucleotide \(i ` with :math:\) 1 leq i leq n ` :
fold_compound.sc_add_bp(vector, options)
In both variants, the options
argument is optional can may be omitted.
Parameters:
vc | The vrna_fold_compound_t the soft constraints are associated with |
i | The nucleotide position the soft constraint is added for |
energy | The free energy (soft-constraint) in :math:` kcal / mol ` |
options | The options flag indicating how/where to store the soft constraints |
See also:
void vrna_sc_remove (vrna_fold_compound_t* vc)
SWIG Wrapper Notes This function is attached as method sc_remove() to objects of type fold_compound
Parameters:
vc | The vrna_fold_compound_t possibly containing soft constraints |
Note
Accepts vrna_fold_compound_t of type VRNA_FC_TYPE_SINGLE and VRNA_FC_TYPE_COMPARATIVE
void vrna_sc_free (vrna_sc_t* sc)
Parameters:
sc | The data structure to free from memory |
void vrna_sc_add_data ( vrna_fold_compound_t* vc, void* data, vrna_callback_free_auxdata* free_data )
SWIG Wrapper Notes This function is attached as method sc_add_data() to objects of type fold_compound
Parameters:
vc | The fold compound the generic soft constraint function should be bound to |
data | A pointer to the data structure that holds required data for function ‘f’ |
free_data | A pointer to a function that free’s the memory occupied by data (Maybe NULL) |
See also:
void vrna_sc_add_f ( vrna_fold_compound_t* vc, vrna_callback_sc_energy* f )
This function allows one to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound_t . The function for evaluating the generic soft constraint feature has to return a pseudo free energy :math:` hat{E} ` in :math:` dacal/mol ` , where :math:` 1 dacal/mol = 10 cal/mol ` .
SWIG Wrapper Notes This function is attached as method sc_add_f() to objects of type fold_compound
Parameters:
vc | The fold compound the generic soft constraint function should be bound to |
f | A pointer to the function that evaluates the generic soft constraint feature |
See also:
void vrna_sc_add_bt ( vrna_fold_compound_t* vc, vrna_callback_sc_backtrack* f )
This function allows one to easily bind a function pointer to the soft constraint part vrna_sc_t of the vrna_fold_compound_t . The provided function should be used for backtracking purposes in loop regions that were altered via the generic soft constraint feature. It has to return an array of vrna_basepair_t data structures, were the last element in the list is indicated by a value of -1 in it’s i position.
SWIG Wrapper Notes This function is attached as method sc_add_bt() to objects of type fold_compound
Parameters:
vc | The fold compound the generic soft constraint function should be bound to |
f | A pointer to the function that returns additional base pairs |
See also:
void vrna_sc_add_exp_f ( vrna_fold_compound_t* vc, vrna_callback_sc_exp_energy* exp_f )
This function allows one to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound_t . The function for evaluating the generic soft constraint feature has to return a pseudo free energy :math:` hat{E} ` as Boltzmann factor, i.e. :math:` exp(- hat{E} / kT) ` . The required unit for :math:` E ` is :math:` cal/mol ` .
SWIG Wrapper Notes This function is attached as method sc_add_exp_f() to objects of type fold_compound
Parameters:
vc | The fold compound the generic soft constraint function should be bound to |
exp_f | A pointer to the function that evaluates the generic soft constraint feature |
See also: