1 #ifndef VIENNA_RNA_PACKAGE_MEA_H 2 #define VIENNA_RNA_PACKAGE_MEA_H 3 4 #include <ViennaRNA/datastructures/basic.h> 5 #include <ViennaRNA/params/basic.h> 6 7 /** 8 * @file MEA.h 9 * @ingroup subopt_and_representatives 10 * @brief Computes a MEA (maximum expected accuracy) structure. 11 */ 12 13 /** 14 * @brief Compute a MEA (maximum expected accuracy) structure 15 * 16 * The algorithm maximizes the expected accuracy 17 * @f[ 18 * A(S) = \sum_{(i,j) \in S} 2 \gamma p_{ij} + \sum_{i \notin S} p^u_i 19 * @f] 20 * Higher values of @f$\gamma@f$ result in more base pairs of lower 21 * probability and thus higher sensitivity. Low values of @f$\gamma@f$ result in structures 22 * containing only highly likely pairs (high specificity). 23 * The code of the MEA function also demonstrates the use of sparse dynamic 24 * programming scheme to reduce the time and memory complexity of folding. 25 * 26 * @pre vrna_pf() must be executed on input parameter @p fc 27 * 28 * @ingroup mea_fold 29 * 30 * @param fc The fold compound data structure with pre-filled base pair probability matrix 31 * @param gamma The weighting factor for base pairs vs. unpaired nucleotides 32 * @param mea A pointer to a variable where the MEA value will be written to 33 * @return An MEA structure (or NULL on any error) 34 */ 35 char * 36 vrna_MEA(vrna_fold_compound_t *fc, 37 double gamma, 38 float *mea); 39 40 41 /** 42 * @brief Compute a MEA (maximum expected accuracy) structure from a list of probabilities 43 * 44 * The algorithm maximizes the expected accuracy 45 * @f[ 46 * A(S) = \sum_{(i,j) \in S} 2 \gamma p_{ij} + \sum_{i \notin S} p^u_i 47 * @f] 48 * Higher values of @f$\gamma@f$ result in more base pairs of lower 49 * probability and thus higher sensitivity. Low values of @f$\gamma@f$ result in structures 50 * containing only highly likely pairs (high specificity). 51 * The code of the MEA function also demonstrates the use of sparse dynamic 52 * programming scheme to reduce the time and memory complexity of folding. 53 * 54 * @note To include G-Quadruplex support, the corresponding field in @p md must be set. 55 * 56 * @ingroup mea_fold 57 * 58 * @param plist A list of base pair probabilities the MEA structure is computed from 59 * @param sequence The RNA sequence that corresponds to the list of probability values 60 * @param gamma The weighting factor for base pairs vs. unpaired nucleotides 61 * @param md A model details data structure (maybe NULL) 62 * @param mea A pointer to a variable where the MEA value will be written to 63 * @return An MEA structure (or NULL on any error) 64 */ 65 char * 66 vrna_MEA_from_plist(vrna_ep_t *plist, 67 const char *sequence, 68 double gamma, 69 vrna_md_t *md, 70 float *mea); 71 72 73 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY 74 75 #ifdef VRNA_WARN_DEPRECATED 76 # if defined(__clang__) 77 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg))) 78 # elif defined(__GNUC__) 79 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg))) 80 # else 81 # define DEPRECATED(func, msg) func 82 # endif 83 #else 84 # define DEPRECATED(func, msg) func 85 #endif 86 87 88 /** 89 * @brief Computes a MEA (maximum expected accuracy) structure. 90 * 91 * @ingroup mea_fold 92 * 93 * The algorithm maximizes the expected accuracy 94 * @f[ A(S) = \sum_{(i,j) \in S} 2 \gamma p_{ij} + \sum_{i \notin S} p^u_i @f] 95 * Higher values of @f$\gamma@f$ result in more base pairs of lower 96 * probability and thus higher sensitivity. Low values of @f$\gamma@f$ result in structures 97 * containing only highly likely pairs (high specificity). 98 * The code of the MEA function also demonstrates the use of sparse dynamic 99 * programming scheme to reduce the time and memory complexity of folding. 100 * 101 * @deprecated Use vrna_MEA() or vrna_MEA_from_plist() instead! 102 */ 103 DEPRECATED(float 104 MEA(plist *p, 105 char *structure, 106 double gamma), 107 "Use vrna_MEA() or vrna_MEA_from_plist() instead!"); 108 109 110 DEPRECATED(float 111 MEA_seq(plist *p, 112 const char *sequence, 113 char *structure, 114 double gamma, 115 vrna_exp_param_t *pf), 116 "Use vrna_MEA() or vrna_MEA_from_plist() instead!"); 117 118 119 #endif 120 121 #endif 122