1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>RNAlib-2.1.2: /home/mescalin/ronny/public_html/programs/ViennaRNA/H/RNAstruct.h File Reference</title>
7 <link href="tabs.css" rel="stylesheet" type="text/css"/>
8 <script type="text/javascript" src="jquery.js"></script>
9 <script type="text/javascript" src="dynsections.js"></script>
10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="resize.js"></script>
12 <script type="text/javascript" src="navtree.js"></script>
13 <script type="text/javascript">
14 $(document).ready(initResizable);
16 <link href="doxygen.css" rel="stylesheet" type="text/css" />
19 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
21 <table cellspacing="0" cellpadding="0">
23 <tr style="height: 56px;">
24 <td style="padding-left: 0.5em;">
25 <div id="projectname">RNAlib-2.1.2
32 <!-- end header part -->
33 <!-- Generated by Doxygen 1.8.1.1 -->
34 <div id="navrow1" class="tabs">
36 <li><a href="index.html"><span>Main Page</span></a></li>
37 <li><a href="pages.html"><span>Related Pages</span></a></li>
38 <li><a href="modules.html"><span>Modules</span></a></li>
39 <li><a href="annotated.html"><span>Data Structures</span></a></li>
40 <li class="current"><a href="files.html"><span>Files</span></a></li>
43 <div id="navrow2" class="tabs2">
45 <li><a href="files.html"><span>File List</span></a></li>
46 <li><a href="globals.html"><span>Globals</span></a></li>
50 <div id="side-nav" class="ui-resizable side-nav-resizable">
52 <div id="nav-tree-contents">
55 <div id="splitbar" style="-moz-user-select:none;"
56 class="ui-resizable-handle">
59 <script type="text/javascript">
60 $(document).ready(function(){initNavTree('RNAstruct_8h.html','');});
62 <div id="doc-content">
65 <a href="#func-members">Functions</a> |
66 <a href="#var-members">Variables</a> </div>
67 <div class="headertitle">
68 <div class="title">RNAstruct.h File Reference</div> </div>
70 <div class="contents">
72 <p>Parsing and Coarse Graining of Structures.
73 <a href="#details">More...</a></p>
75 <p><a href="RNAstruct_8h_source.html">Go to the source code of this file.</a></p>
76 <table class="memberdecls">
77 <tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
78 Functions</h2></td></tr>
79 <tr class="memitem:a07b7e90e712559a1992fba3ac6d21bbd"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a07b7e90e712559a1992fba3ac6d21bbd">b2HIT</a> (const char *structure)</td></tr>
80 <tr class="memdesc:a07b7e90e712559a1992fba3ac6d21bbd"><td class="mdescLeft"> </td><td class="mdescRight">Converts the full structure from bracket notation to the HIT notation including root. <a href="#a07b7e90e712559a1992fba3ac6d21bbd"></a><br/></td></tr>
81 <tr class="memitem:a9c80d92391f2833549a8b6dac92233f0"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a9c80d92391f2833549a8b6dac92233f0">b2C</a> (const char *structure)</td></tr>
82 <tr class="memdesc:a9c80d92391f2833549a8b6dac92233f0"><td class="mdescLeft"> </td><td class="mdescRight">Converts the full structure from bracket notation to the a coarse grained notation using the 'H' 'B' 'I' 'M' and 'R' identifiers. <a href="#a9c80d92391f2833549a8b6dac92233f0"></a><br/></td></tr>
83 <tr class="memitem:a5cd2feb367feeacad0c03cb7ddba5f10"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a5cd2feb367feeacad0c03cb7ddba5f10">b2Shapiro</a> (const char *structure)</td></tr>
84 <tr class="memdesc:a5cd2feb367feeacad0c03cb7ddba5f10"><td class="mdescLeft"> </td><td class="mdescRight">Converts the full structure from bracket notation to the <em>weighted</em> coarse grained notation using the 'H' 'B' 'I' 'M' 'S' 'E' and 'R' identifiers. <a href="#a5cd2feb367feeacad0c03cb7ddba5f10"></a><br/></td></tr>
85 <tr class="memitem:a880d33066dd95441e5fbb73c57ed1c3e"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a880d33066dd95441e5fbb73c57ed1c3e">add_root</a> (const char *structure)</td></tr>
86 <tr class="memdesc:a880d33066dd95441e5fbb73c57ed1c3e"><td class="mdescLeft"> </td><td class="mdescRight">Adds a root to an un-rooted tree in any except bracket notation. <a href="#a880d33066dd95441e5fbb73c57ed1c3e"></a><br/></td></tr>
87 <tr class="memitem:abe3d815b420dc4553bfb23511198b4c6"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#abe3d815b420dc4553bfb23511198b4c6">expand_Shapiro</a> (const char *coarse)</td></tr>
88 <tr class="memdesc:abe3d815b420dc4553bfb23511198b4c6"><td class="mdescLeft"> </td><td class="mdescRight">Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from <a class="el" href="RNAstruct_8h.html#a9c80d92391f2833549a8b6dac92233f0" title="Converts the full structure from bracket notation to the a coarse grained notation using the 'H' 'B' ...">b2C()</a>. <a href="#abe3d815b420dc4553bfb23511198b4c6"></a><br/></td></tr>
89 <tr class="memitem:a78d73cd54a068ef2812812771cdddc6f"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a78d73cd54a068ef2812812771cdddc6f">expand_Full</a> (const char *structure)</td></tr>
90 <tr class="memdesc:a78d73cd54a068ef2812812771cdddc6f"><td class="mdescLeft"> </td><td class="mdescRight">Convert the full structure from bracket notation to the expanded notation including root. <a href="#a78d73cd54a068ef2812812771cdddc6f"></a><br/></td></tr>
91 <tr class="memitem:a260c4b622093b76a883bf96628280de1"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a260c4b622093b76a883bf96628280de1">unexpand_Full</a> (const char *ffull)</td></tr>
92 <tr class="memdesc:a260c4b622093b76a883bf96628280de1"><td class="mdescLeft"> </td><td class="mdescRight">Restores the bracket notation from an expanded full or HIT tree, that is any tree using only identifiers 'U' 'P' and 'R'. <a href="#a260c4b622093b76a883bf96628280de1"></a><br/></td></tr>
93 <tr class="memitem:a09a80253ac7b6bae606871ba7c6e5136"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a09a80253ac7b6bae606871ba7c6e5136">unweight</a> (const char *wcoarse)</td></tr>
94 <tr class="memdesc:a09a80253ac7b6bae606871ba7c6e5136"><td class="mdescLeft"> </td><td class="mdescRight">Strip weights from any weighted tree. <a href="#a09a80253ac7b6bae606871ba7c6e5136"></a><br/></td></tr>
95 <tr class="memitem:a1054c4477d53b31d79d4cb132100e87a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a1054c4477d53b31d79d4cb132100e87a">unexpand_aligned_F</a> (char *align[2])</td></tr>
96 <tr class="memdesc:a1054c4477d53b31d79d4cb132100e87a"><td class="mdescLeft"> </td><td class="mdescRight">Converts two aligned structures in expanded notation. <a href="#a1054c4477d53b31d79d4cb132100e87a"></a><br/></td></tr>
97 <tr class="memitem:a3c79042e6bf6f01706bf30ec9e69e8ac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a3c79042e6bf6f01706bf30ec9e69e8ac">parse_structure</a> (const char *structure)</td></tr>
98 <tr class="memdesc:a3c79042e6bf6f01706bf30ec9e69e8ac"><td class="mdescLeft"> </td><td class="mdescRight">Collects a statistic of structure elements of the full structure in bracket notation. <a href="#a3c79042e6bf6f01706bf30ec9e69e8ac"></a><br/></td></tr>
99 </table><table class="memberdecls">
100 <tr class="heading"><td colspan="2"><h2><a name="var-members"></a>
101 Variables</h2></td></tr>
102 <tr class="memitem:a3f31e0e48125601bfa57b52f8b038e8e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f31e0e48125601bfa57b52f8b038e8e"></a>
103 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a3f31e0e48125601bfa57b52f8b038e8e">loop_size</a> [STRUC]</td></tr>
104 <tr class="memdesc:a3f31e0e48125601bfa57b52f8b038e8e"><td class="mdescLeft"> </td><td class="mdescRight">contains a list of all loop sizes. loop_size[0] contains the number of external bases. <br/></td></tr>
105 <tr class="memitem:a8218c0d581a3fba2a1a56a196abe19a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8218c0d581a3fba2a1a56a196abe19a5"></a>
106 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a8218c0d581a3fba2a1a56a196abe19a5">helix_size</a> [STRUC]</td></tr>
107 <tr class="memdesc:a8218c0d581a3fba2a1a56a196abe19a5"><td class="mdescLeft"> </td><td class="mdescRight">contains a list of all stack sizes. <br/></td></tr>
108 <tr class="memitem:aef14e2f8ab3f61e8e659ba6b9003b08a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef14e2f8ab3f61e8e659ba6b9003b08a"></a>
109 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#aef14e2f8ab3f61e8e659ba6b9003b08a">loop_degree</a> [STRUC]</td></tr>
110 <tr class="memdesc:aef14e2f8ab3f61e8e659ba6b9003b08a"><td class="mdescLeft"> </td><td class="mdescRight">contains the corresponding list of loop degrees. <br/></td></tr>
111 <tr class="memitem:a439fcb9f8d4f9f4d2227fde5fbfecb30"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a439fcb9f8d4f9f4d2227fde5fbfecb30"></a>
112 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a439fcb9f8d4f9f4d2227fde5fbfecb30">loops</a></td></tr>
113 <tr class="memdesc:a439fcb9f8d4f9f4d2227fde5fbfecb30"><td class="mdescLeft"> </td><td class="mdescRight">contains the number of loops ( and therefore of stacks ). <br/></td></tr>
114 <tr class="memitem:add2f952597e02d66e1116a9d11d252d6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add2f952597e02d66e1116a9d11d252d6"></a>
115 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#add2f952597e02d66e1116a9d11d252d6">unpaired</a></td></tr>
116 <tr class="memdesc:add2f952597e02d66e1116a9d11d252d6"><td class="mdescLeft"> </td><td class="mdescRight">contains the number of unpaired bases. <br/></td></tr>
117 <tr class="memitem:a6341cbb704924824e0236c1dce791032"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6341cbb704924824e0236c1dce791032"></a>
118 int </td><td class="memItemRight" valign="bottom"><a class="el" href="RNAstruct_8h.html#a6341cbb704924824e0236c1dce791032">pairs</a></td></tr>
119 <tr class="memdesc:a6341cbb704924824e0236c1dce791032"><td class="mdescLeft"> </td><td class="mdescRight">contains the number of base pairs in the last parsed structure. <br/></td></tr>
121 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
122 <div class="textblock"><p>Parsing and Coarse Graining of Structures. </p>
123 <pre class="fragment">Example:
124 </pre> <pre class="fragment"> * .((..(((...)))..((..)))). is the bracket or full tree
125 * becomes expanded: - expand_Full() -
126 * ((U)(((U)(U)((((U)(U)(U)P)P)P)(U)(U)(((U)(U)P)P)P)P)(U)R)
128 * ((U1)((U2)((U3)P3)(U2)((U2)P2)P2)(U1)R)
131 * becomes expanded: - expand_Shapiro() -
132 * (((((H)S)((H)S)M)S)R)
133 * weighted Shapiro: - b2Shapiro() -
134 * ((((((H3)S3)((H2)S2)M4)S2)E2)R)
135 * </pre> </div><hr/><h2>Function Documentation</h2>
136 <a class="anchor" id="a07b7e90e712559a1992fba3ac6d21bbd"></a>
137 <div class="memitem">
138 <div class="memproto">
139 <table class="memname">
141 <td class="memname">char* b2HIT </td>
143 <td class="paramtype">const char * </td>
144 <td class="paramname"><em>structure</em></td><td>)</td>
148 </div><div class="memdoc">
150 <p>Converts the full structure from bracket notation to the HIT notation including root. </p>
151 <dl class="params"><dt>Parameters:</dt><dd>
152 <table class="params">
153 <tr><td class="paramname">structure</td><td></td></tr>
157 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
161 <a class="anchor" id="a9c80d92391f2833549a8b6dac92233f0"></a>
162 <div class="memitem">
163 <div class="memproto">
164 <table class="memname">
166 <td class="memname">char* b2C </td>
168 <td class="paramtype">const char * </td>
169 <td class="paramname"><em>structure</em></td><td>)</td>
173 </div><div class="memdoc">
175 <p>Converts the full structure from bracket notation to the a coarse grained notation using the 'H' 'B' 'I' 'M' and 'R' identifiers. </p>
176 <dl class="params"><dt>Parameters:</dt><dd>
177 <table class="params">
178 <tr><td class="paramname">structure</td><td></td></tr>
182 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
186 <a class="anchor" id="a5cd2feb367feeacad0c03cb7ddba5f10"></a>
187 <div class="memitem">
188 <div class="memproto">
189 <table class="memname">
191 <td class="memname">char* b2Shapiro </td>
193 <td class="paramtype">const char * </td>
194 <td class="paramname"><em>structure</em></td><td>)</td>
198 </div><div class="memdoc">
200 <p>Converts the full structure from bracket notation to the <em>weighted</em> coarse grained notation using the 'H' 'B' 'I' 'M' 'S' 'E' and 'R' identifiers. </p>
201 <dl class="params"><dt>Parameters:</dt><dd>
202 <table class="params">
203 <tr><td class="paramname">structure</td><td></td></tr>
207 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
211 <a class="anchor" id="a880d33066dd95441e5fbb73c57ed1c3e"></a>
212 <div class="memitem">
213 <div class="memproto">
214 <table class="memname">
216 <td class="memname">char* add_root </td>
218 <td class="paramtype">const char * </td>
219 <td class="paramname"><em>structure</em></td><td>)</td>
223 </div><div class="memdoc">
225 <p>Adds a root to an un-rooted tree in any except bracket notation. </p>
226 <dl class="params"><dt>Parameters:</dt><dd>
227 <table class="params">
228 <tr><td class="paramname">structure</td><td></td></tr>
232 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
236 <a class="anchor" id="abe3d815b420dc4553bfb23511198b4c6"></a>
237 <div class="memitem">
238 <div class="memproto">
239 <table class="memname">
241 <td class="memname">char* expand_Shapiro </td>
243 <td class="paramtype">const char * </td>
244 <td class="paramname"><em>coarse</em></td><td>)</td>
248 </div><div class="memdoc">
250 <p>Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from <a class="el" href="RNAstruct_8h.html#a9c80d92391f2833549a8b6dac92233f0" title="Converts the full structure from bracket notation to the a coarse grained notation using the 'H' 'B' ...">b2C()</a>. </p>
251 <dl class="params"><dt>Parameters:</dt><dd>
252 <table class="params">
253 <tr><td class="paramname">coarse</td><td></td></tr>
257 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
261 <a class="anchor" id="a78d73cd54a068ef2812812771cdddc6f"></a>
262 <div class="memitem">
263 <div class="memproto">
264 <table class="memname">
266 <td class="memname">char* expand_Full </td>
268 <td class="paramtype">const char * </td>
269 <td class="paramname"><em>structure</em></td><td>)</td>
273 </div><div class="memdoc">
275 <p>Convert the full structure from bracket notation to the expanded notation including root. </p>
276 <dl class="params"><dt>Parameters:</dt><dd>
277 <table class="params">
278 <tr><td class="paramname">structure</td><td></td></tr>
282 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
286 <a class="anchor" id="a260c4b622093b76a883bf96628280de1"></a>
287 <div class="memitem">
288 <div class="memproto">
289 <table class="memname">
291 <td class="memname">char* unexpand_Full </td>
293 <td class="paramtype">const char * </td>
294 <td class="paramname"><em>ffull</em></td><td>)</td>
298 </div><div class="memdoc">
300 <p>Restores the bracket notation from an expanded full or HIT tree, that is any tree using only identifiers 'U' 'P' and 'R'. </p>
301 <dl class="params"><dt>Parameters:</dt><dd>
302 <table class="params">
303 <tr><td class="paramname">ffull</td><td></td></tr>
307 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
311 <a class="anchor" id="a09a80253ac7b6bae606871ba7c6e5136"></a>
312 <div class="memitem">
313 <div class="memproto">
314 <table class="memname">
316 <td class="memname">char* unweight </td>
318 <td class="paramtype">const char * </td>
319 <td class="paramname"><em>wcoarse</em></td><td>)</td>
323 </div><div class="memdoc">
325 <p>Strip weights from any weighted tree. </p>
326 <dl class="params"><dt>Parameters:</dt><dd>
327 <table class="params">
328 <tr><td class="paramname">wcoarse</td><td></td></tr>
332 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
336 <a class="anchor" id="a1054c4477d53b31d79d4cb132100e87a"></a>
337 <div class="memitem">
338 <div class="memproto">
339 <table class="memname">
341 <td class="memname">void unexpand_aligned_F </td>
343 <td class="paramtype">char * </td>
344 <td class="paramname"><em>align</em>[2]</td><td>)</td>
348 </div><div class="memdoc">
350 <p>Converts two aligned structures in expanded notation. </p>
351 <p>Takes two aligned structures as produced by <a class="el" href="treedist_8h.html#a3b21f1925f7071f46d93431a835217bb" title="Calculates the edit distance of the two trees.">tree_edit_distance()</a> function back to bracket notation with '_' as the gap character. The result overwrites the input.</p>
352 <dl class="params"><dt>Parameters:</dt><dd>
353 <table class="params">
354 <tr><td class="paramname">align</td><td></td></tr>
361 <a class="anchor" id="a3c79042e6bf6f01706bf30ec9e69e8ac"></a>
362 <div class="memitem">
363 <div class="memproto">
364 <table class="memname">
366 <td class="memname">void parse_structure </td>
368 <td class="paramtype">const char * </td>
369 <td class="paramname"><em>structure</em></td><td>)</td>
373 </div><div class="memdoc">
375 <p>Collects a statistic of structure elements of the full structure in bracket notation. </p>
376 <p>The function writes to the following global variables: <a class="el" href="RNAstruct_8h.html#a3f31e0e48125601bfa57b52f8b038e8e" title="contains a list of all loop sizes. loop_size[0] contains the number of external bases.">loop_size</a>, <a class="el" href="RNAstruct_8h.html#aef14e2f8ab3f61e8e659ba6b9003b08a" title="contains the corresponding list of loop degrees.">loop_degree</a>, <a class="el" href="RNAstruct_8h.html#a8218c0d581a3fba2a1a56a196abe19a5" title="contains a list of all stack sizes.">helix_size</a>, <a class="el" href="RNAstruct_8h.html#a439fcb9f8d4f9f4d2227fde5fbfecb30" title="contains the number of loops ( and therefore of stacks ).">loops</a>, <a class="el" href="RNAstruct_8h.html#a6341cbb704924824e0236c1dce791032" title="contains the number of base pairs in the last parsed structure.">pairs</a>, <a class="el" href="RNAstruct_8h.html#add2f952597e02d66e1116a9d11d252d6" title="contains the number of unpaired bases.">unpaired</a></p>
377 <dl class="params"><dt>Parameters:</dt><dd>
378 <table class="params">
379 <tr><td class="paramname">structure</td><td></td></tr>
383 <dl class="section return"><dt>Returns:</dt><dd></dd></dl>
387 </div><!-- contents -->
388 </div><!-- doc-content -->
389 <!-- start footer part -->
390 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
392 <li class="navelem"><a class="el" href="dir_d72344b28b4f2089ce25682c4e6eba22.html">H</a></li><li class="navelem"><a class="el" href="RNAstruct_8h.html">RNAstruct.h</a></li>
393 <li class="footer">Generated on Wed Jul 24 2013 13:38:58 for RNAlib-2.1.2 by
394 <a href="http://www.doxygen.org/index.html">
395 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>