1 #ifndef __VIENNA_RNA_PACKAGE_LPFOLD_H__
2 #define __VIENNA_RNA_PACKAGE_LPFOLD_H__
4 #include "data_structures.h"
7 #define DEPRECATED(func) func __attribute__ ((deprecated))
9 #define DEPRECATED(func) func
13 * \addtogroup local_pf_fold
16 * \brief Function declarations of partition function variants of the Lfold algorithm
25 * \ingroup local_pf_fold
29 void update_pf_paramsLP(int length);
34 * \ingroup local_pf_fold
37 void update_pf_paramsLP_par(int length, pf_paramT *parameters);
40 * \brief Compute partition functions for locally stable secondary structures
42 * pfl_fold computes partition functions for every window of size
43 * 'winSize' possible in a RNA molecule, allowing only pairs with a span
44 * smaller than 'pairSize'. It returns the mean pair probabilities averaged
45 * over all windows containing the pair in 'pl'. 'winSize' should
46 * always be >= 'pairSize'. Note that in contrast to Lfold(),
47 * bases outside of the window do not influence the structure at all. Only
48 * probabilities higher than 'cutoffb' are kept.
50 * If 'pU' is supplied (i.e is not the NULL pointer), pfl_fold()
51 * will also compute the mean probability that regions of length 'u' and smaller are
52 * unpaired. The parameter 'u' is supplied in 'pup[0][0]'. On return
53 * the 'pup' array will contain these probabilities, with the entry on
54 * 'pup[x][y]' containing the mean probability that x and the y-1
55 * preceding bases are unpaired. The 'pU' array needs to be large
56 * enough to hold n+1 float* entries, where n is the sequence length.
58 * If an array dpp2 is supplied, the probability of base pair (i,j)
59 * given that there already exists a base pair (i+1,j-1) is also
60 * computed and saved in this array. If pUfp is given (i.e. not NULL), pU
61 * is not saved but put out imediately. If spup is given (i.e. is not NULL),
62 * the pair probabilities in pl are not saved but put out imediately.
64 * \ingroup local_pf_fold
66 * \param sequence RNA sequence
67 * \param winSize size of the window
68 * \param pairSize maximum size of base pair
69 * \param cutoffb cutoffb for base pairs
70 * \param pU array holding all unpaired probabilities
71 * \param dpp2 array of dependent pair probabilities
72 * \param pUfp file pointer for pU
73 * \param spup file pointer for pair probabilities
74 * \return list of pair probabilities
76 plist *pfl_fold(char *sequence,
86 * \brief Compute partition functions for locally stable secondary structures
88 * \ingroup local_pf_fold
91 plist *pfl_fold_par(char *sequence,
99 pf_paramT *parameters);
102 void putoutpU_prob_par( double **pU,
107 pf_paramT *parameters);
111 * \brief Writes the unpaired probabilities (pU) or opening energies into a file
113 * Can write either the unpaired probabilities (accessibilities) pU or
114 * the opening energies -log(pU)kT into a file
116 * \ingroup local_pf_fold
118 * \param pU pair probabilities
119 * \param length length of RNA sequence
120 * \param ulength maximum length of unpaired stretch
121 * \param fp file pointer of destination file
122 * \param energies switch to put out as opening energies
124 void putoutpU_prob(double **pU,
130 void putoutpU_prob_bin_par( double **pU,
135 pf_paramT *parameters);
138 * \brief Writes the unpaired probabilities (pU) or opening energies into a binary file
140 * Can write either the unpaired probabilities (accessibilities) pU or
141 * the opening energies -log(pU)kT into a file
143 * \ingroup local_pf_fold
145 * \param pU pair probabilities
146 * \param length length of RNA sequence
147 * \param ulength maximum length of unpaired stretch
148 * \param fp file pointer of destination file
149 * \param energies switch to put out as opening energies
151 void putoutpU_prob_bin(double **pU,
158 * Dunno if this function was ever used by external programs linking to RNAlib, but it
159 * was declared PUBLIC before.
160 * Anyway, never use this function as it will be removed soon and does nothing at all
162 DEPRECATED(void init_pf_foldLP(int length));