1 #ifndef VIENNA_RNA_PACKAGE_RNASTRUCT_H
2 #define VIENNA_RNA_PACKAGE_RNASTRUCT_H
3 
4 #ifdef VRNA_WARN_DEPRECATED
5 # if defined(__clang__)
6 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
7 # elif defined(__GNUC__)
8 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
9 # else
10 #  define DEPRECATED(func, msg) func
11 # endif
12 #else
13 # define DEPRECATED(func, msg) func
14 #endif
15 
16 /**
17  *  @addtogroup   struct_utils_deprecated
18  *
19  *  @{
20  *
21  *  @file RNAstruct.h
22  *  @brief Parsing and Coarse Graining of Structures
23  *
24  *   Example:
25  *  @verbatim
26  *   .((..(((...)))..((..)))).   is the bracket or full tree
27  *   becomes expanded:   - expand_Full() -
28  *   ((U)(((U)(U)((((U)(U)(U)P)P)P)(U)(U)(((U)(U)P)P)P)P)(U)R)
29  *   HIT:                - b2HIT() -
30  *   ((U1)((U2)((U3)P3)(U2)((U2)P2)P2)(U1)R)
31  *   Coarse:             - b2C() -
32  *   ((H)((H)M)R)
33  *   becomes expanded:   - expand_Shapiro() -
34  *   (((((H)S)((H)S)M)S)R)
35  *   weighted Shapiro:   - b2Shapiro() -
36  *   ((((((H3)S3)((H2)S2)M4)S2)E2)R)
37  *  @endverbatim
38  */
39 
40 #define STRUC     2000
41 
42 /**
43  *  @brief Converts the full structure from bracket notation to the HIT
44  *  notation including root.
45  *
46  *  @deprecated   See vrna_db_to_tree_string() and #VRNA_STRUCTURE_TREE_HIT
47  *                for a replacement
48  *
49  *  @param structure
50  *  @return
51  */
52 DEPRECATED(char *b2HIT(const char *structure),
53            "Use vrna_db_to_tree_string() instead!");             /* Full   -> HIT    [incl. root] */
54 
55 
56 /**
57  *  @brief Converts the full structure from bracket notation to the a
58  *  coarse grained notation using the 'H' 'B' 'I' 'M' and 'R' identifiers.
59  *
60  *  @deprecated   See vrna_db_to_tree_string() and #VRNA_STRUCTURE_TREE_SHAPIRO_SHORT
61  *                for a replacement
62  *
63  *  @param structure
64  *  @return
65  */
66 DEPRECATED(char *b2C(const char *structure),
67            "Use vrna_db_to_tree_string() instead!");               /* Full   -> Coarse [incl. root] */
68 
69 
70 /**
71  *  @brief Converts the full structure from bracket notation to the
72  *  <i>weighted</i> coarse grained notation using the 'H' 'B' 'I' 'M' 'S' 'E' and
73  *  'R' identifiers.
74  *
75  *  @deprecated   See vrna_db_to_tree_string() and #VRNA_STRUCTURE_TREE_SHAPIRO_WEIGHT
76  *                for a replacement
77  *
78  *  @param structure
79  *  @return
80  */
81 DEPRECATED(char *b2Shapiro(const char *structure),
82            "Use vrna_db_to_tree_string() instead!");         /* Full -> weighted Shapiro [i.r.] */
83 
84 
85 /**
86  *  @brief Adds a root to an un-rooted tree in any except bracket notation.
87  *
88  *  @param  structure
89  *  @return
90  */
91 DEPRECATED(char *add_root(const char *structure),
92            "");                   /* {Tree} -> ({Tree}R)          */
93 
94 
95 /**
96  *  @brief Inserts missing 'S' identifiers in unweighted coarse grained structures
97  *  as obtained from b2C().
98  *
99  *  @param coarse
100  *  @return
101  */
102 DEPRECATED(char *expand_Shapiro(const char *coarse),
103            "Use vrna_db_to_tree_string() instead!");
104 
105 
106 /* add S for stacks to coarse struct */
107 /**
108  *  @brief Convert the full structure from bracket notation to the
109  *  expanded notation including root.
110  *
111  *  @param structure
112  *  @return
113  */
114 DEPRECATED(char *expand_Full(const char *structure),
115            "Use vrna_db_to_tree_string() instead!");       /* Full   -> FFull         */
116 
117 
118 /**
119  *  @brief Restores the bracket notation from an expanded full or HIT tree, that is
120  *  any tree using only identifiers 'U' 'P' and 'R'.
121  *
122  *  @param ffull
123  *  @return
124  */
125 DEPRECATED(char *unexpand_Full(const char *ffull),
126            "Use vrna_tree_string_to_db() instead!");         /* FFull  -> Full          */
127 
128 
129 /**
130  *  @brief Strip weights from any weighted tree.
131  *
132  *  @param wcoarse
133  *  @return
134  */
135 DEPRECATED(char *unweight(const char *wcoarse),
136            "Use vrna_tree_string_unweight() instead!");            /* remove weights from coarse struct */
137 
138 
139 /**
140  *  @brief Converts two aligned structures in expanded notation.
141  *
142  *  Takes two aligned structures as produced by
143  *  tree_edit_distance() function back to bracket notation with '_'
144  *  as the gap character. The result overwrites the input.
145  *
146  *  @param align
147  */
148 DEPRECATED(void   unexpand_aligned_F(char *align[2]),
149            "");
150 
151 
152 /**
153  *  @brief Collects a statistic of structure elements of the full structure in
154  *  bracket notation.
155  *
156  *  The function writes to the following global variables:
157  *  #loop_size, #loop_degree, #helix_size, #loops, #pairs, #unpaired
158  *
159  *  @param structure
160  *  @return
161  */
162 DEPRECATED(void   parse_structure(const char *structure),
163            "");  /* make structure statistics */
164 
165 
166 /**
167  *  @brief contains a list of all loop sizes. loop_size[0] contains the
168  *  number of external bases.
169  */
170 DEPRECATED(extern int loop_size[STRUC],
171            "");         /* loop sizes of a structure */
172 
173 /**
174  *  @brief contains a list of all stack sizes.
175  */
176 DEPRECATED(extern int helix_size[STRUC],
177            "");        /* helix sizes of a structure */
178 
179 /**
180  *  @brief contains the corresponding list of loop degrees.
181  */
182 DEPRECATED(extern int loop_degree[STRUC],
183            "");       /* loop degrees of a structure */
184 
185 /**
186  *  @brief contains the number of loops ( and therefore of stacks ).
187  */
188 DEPRECATED(extern int loops,
189            "");                    /* n of loops and stacks */
190 
191 /**
192  *  @brief contains the number of unpaired bases.
193  */
194 DEPRECATED(extern int unpaired,
195            "");
196 
197 /**
198  *  @brief contains the number of base pairs in the last parsed structure.
199  */
200 DEPRECATED(extern int pairs,
201            "");          /* n of unpaired digits and pairs */
202 
203 /**
204  * @}
205  */
206 
207 #endif
208