RNAlib-2.4.14

Partition function implementations for base pair distance classes. More...

+ Include dependency graph for 2Dpfold.h:

Go to the source code of this file.

Data Structures

struct  vrna_sol_TwoD_pf_t
 Solution element returned from vrna_pf_TwoD() More...
 
struct  TwoDpfold_vars
 Variables compound for 2Dfold partition function folding. More...
 

Typedefs

typedef struct vrna_sol_TwoD_pf_t vrna_sol_TwoD_pf_t
 Solution element returned from vrna_pf_TwoD() More...
 

Functions

vrna_sol_TwoD_pf_tvrna_pf_TwoD (vrna_fold_compound_t *vc, int maxDistance1, int maxDistance2)
 Compute the partition function for all distance classes. More...
 
char * vrna_pbacktrack_TwoD (vrna_fold_compound_t *vc, int d1, int d2)
 Sample secondary structure representatives from a set of distance classes according to their Boltzmann probability. More...
 
char * vrna_pbacktrack5_TwoD (vrna_fold_compound_t *vc, int d1, int d2, unsigned int length)
 Sample secondary structure representatives with a specified length from a set of distance classes according to their Boltzmann probability. More...
 
TwoDpfold_varsget_TwoDpfold_variables (const char *seq, const char *structure1, char *structure2, int circ)
 Get a datastructure containing all necessary attributes and global folding switches. More...
 
void destroy_TwoDpfold_variables (TwoDpfold_vars *vars)
 Free all memory occupied by a TwoDpfold_vars datastructure. More...
 
vrna_sol_TwoD_pf_tTwoDpfoldList (TwoDpfold_vars *vars, int maxDistance1, int maxDistance2)
 Compute the partition function for all distance classes. More...
 
char * TwoDpfold_pbacktrack (TwoDpfold_vars *vars, int d1, int d2)
 Sample secondary structure representatives from a set of distance classes according to their Boltzmann probability. More...
 
char * TwoDpfold_pbacktrack5 (TwoDpfold_vars *vars, int d1, int d2, unsigned int length)
 Sample secondary structure representatives with a specified length from a set of distance classes according to their Boltzmann probability. More...
 

Detailed Description

Partition function implementations for base pair distance classes.

Function Documentation

TwoDpfold_vars* get_TwoDpfold_variables ( const char *  seq,
const char *  structure1,
char *  structure2,
int  circ 
)

Get a datastructure containing all necessary attributes and global folding switches.

This function prepares all necessary attributes and matrices etc which are needed for a call of TwoDpfold() . A snapshot of all current global model switches (dangles, temperature and so on) is done and stored in the returned datastructure. Additionally, all matrices that will hold the partition function values are prepared.

Deprecated:
Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD(), vrna_pf_TwoD(), and vrna_fold_compound_free() instead!
Parameters
seqthe RNA sequence in uppercase format with letters from the alphabet {AUCG}
structure1the first reference structure in dot-bracket notation
structure2the second reference structure in dot-bracket notation
circa switch indicating if the sequence is linear (0) or circular (1)
Returns
the datastructure containing all necessary partition function attributes
void destroy_TwoDpfold_variables ( TwoDpfold_vars vars)

Free all memory occupied by a TwoDpfold_vars datastructure.

This function free's all memory occupied by a datastructure obtained from from get_TwoDpfold_variabless() or get_TwoDpfold_variables_from_MFE()

Deprecated:
Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD(), vrna_pf_TwoD(), and vrna_fold_compound_free() instead!
See also
get_TwoDpfold_variables(), get_TwoDpfold_variables_from_MFE()
Parameters
varsthe datastructure to be free'd
vrna_sol_TwoD_pf_t* TwoDpfoldList ( TwoDpfold_vars vars,
int  maxDistance1,
int  maxDistance2 
)

Compute the partition function for all distance classes.

This function computes the partition functions for all distance classes according the two reference structures specified in the datastructure 'vars'. Similar to TwoDfold() the arguments maxDistance1 and maxDistance2 specify the maximum distance to both reference structures. A value of '-1' in either of them makes the appropriate distance restrictionless, i.e. all basepair distancies to the reference are taken into account during computation. In case there is a restriction, the returned solution contains an entry where the attribute k=l=-1 contains the partition function for all structures exceeding the restriction. A values of INF in the attribute 'k' of the returned list denotes the end of the list

Deprecated:
Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD(), vrna_pf_TwoD(), and vrna_fold_compound_free() instead!
See also
get_TwoDpfold_variables(), destroy_TwoDpfold_variables(), vrna_sol_TwoD_pf_t
Parameters
varsthe datastructure containing all necessary folding attributes and matrices
maxDistance1the maximum basepair distance to reference1 (may be -1)
maxDistance2the maximum basepair distance to reference2 (may be -1)
Returns
a list of partition funtions for the appropriate distance classes
char* TwoDpfold_pbacktrack ( TwoDpfold_vars vars,
int  d1,
int  d2 
)

Sample secondary structure representatives from a set of distance classes according to their Boltzmann probability.

If the argument 'd1' is set to '-1', the structure will be backtracked in the distance class where all structures exceeding the maximum basepair distance to either of the references reside.

Precondition
The argument 'vars' must contain precalculated partition function matrices, i.e. a call to TwoDpfold() preceding this function is mandatory!
Deprecated:
Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD(), vrna_pf_TwoD(), vrna_pbacktrack_TwoD(), and vrna_fold_compound_free() instead!
See also
TwoDpfold()
Parameters
[in]varsthe datastructure containing all necessary folding attributes and matrices
[in]d1the distance to reference1 (may be -1)
[in]d2the distance to reference2
Returns
A sampled secondary structure in dot-bracket notation
char* TwoDpfold_pbacktrack5 ( TwoDpfold_vars vars,
int  d1,
int  d2,
unsigned int  length 
)

Sample secondary structure representatives with a specified length from a set of distance classes according to their Boltzmann probability.

This function does essentially the same as TwoDpfold_pbacktrack() with the only difference that partial structures, i.e. structures beginning from the 5' end with a specified length of the sequence, are backtracked

Note
This function does not work (since it makes no sense) for circular RNA sequences!
Precondition
The argument 'vars' must contain precalculated partition function matrices, i.e. a call to TwoDpfold() preceding this function is mandatory!
Deprecated:
Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD(), vrna_pf_TwoD(), vrna_pbacktrack5_TwoD(), and vrna_fold_compound_free() instead!
See also
TwoDpfold_pbacktrack(), TwoDpfold()
Parameters
[in]varsthe datastructure containing all necessary folding attributes and matrices
[in]d1the distance to reference1 (may be -1)
[in]d2the distance to reference2
[in]lengththe length of the structure beginning from the 5' end
Returns
A sampled secondary structure in dot-bracket notation