<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>RNAlib-2.1.2: Utilities - Odds and Ends</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
- $(document).ready(initResizable);
-</script>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td style="padding-left: 0.5em;">
- <div id="projectname">RNAlib-2.1.2
- </div>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.1.1 -->
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
+<!-- Generated by Doxygen 1.6.1 -->
+<script type="text/javascript">
+<!--
+function changeDisplayState (e){
+ var num=this.id.replace(/[^[0-9]/g,'');
+ var button=this.firstChild;
+ var sectionDiv=document.getElementById('dynsection'+num);
+ if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
+ sectionDiv.style.display='block';
+ button.src='open.gif';
+ }else{
+ sectionDiv.style.display='none';
+ button.src='closed.gif';
+ }
+}
+function initDynSections(){
+ var divs=document.getElementsByTagName('div');
+ var sectionCounter=1;
+ for(var i=0;i<divs.length-1;i++){
+ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
+ var header=divs[i];
+ var section=divs[i+1];
+ var button=header.firstChild;
+ if (button!='IMG'){
+ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
+ button=document.createElement('img');
+ divs[i].insertBefore(button,divs[i].firstChild);
+ }
+ header.style.cursor='pointer';
+ header.onclick=changeDisplayState;
+ header.id='dynheader'+sectionCounter;
+ button.src='closed.gif';
+ section.id='dynsection'+sectionCounter;
+ section.style.display='none';
+ section.style.marginLeft='14px';
+ sectionCounter++;
+ }
+ }
+}
+window.onload = initDynSections;
+-->
+</script>
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="main.html"><span>Main Page</span></a></li>
+ <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
+ <li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('mp_utils.html','');});
-</script>
-<div id="doc-content">
-<div class="header">
- <div class="headertitle">
-<div class="title">Utilities - Odds and Ends </div> </div>
-</div><!--header-->
<div class="contents">
-<div class="textblock"><p><a class="anchor" id="toc"></a> </p>
+
+
+<h1><a class="anchor" id="mp_utils">Utilities - Odds and Ends </a></h1><p><a class="anchor" id="toc"></a></p>
<h3>Table of Contents</h3>
<hr/>
<ul>
<li><a class="el" href="mp_utils.html#utils_misc">Miscellaneous Utilities</a></li>
</ul>
<hr/>
-<h1><a class="anchor" id="utils_ss"></a>
-Producing secondary structure graphs</h1>
-<pre class="fragment">int PS_rna_plot ( char *string,
+<h2><a class="anchor" id="utils_ss">
+Producing secondary structure graphs</a></h2>
+<div class="fragment"><pre class="fragment">
+int PS_rna_plot ( char *string,
char *structure,
char *file)
-</pre><p> Produce a secondary structure graph in PostScript and write it to 'filename'. </p>
-<pre class="fragment">int PS_rna_plot_a (
+</pre></div><p> Produce a secondary structure graph in PostScript and write it to 'filename'. </p>
+<div class="fragment"><pre class="fragment">
+int PS_rna_plot_a (
char *string,
char *structure,
char *file,
char *pre,
char *post)
-</pre><p> Produce a secondary structure graph in PostScript including additional annotation macros and write it to 'filename'. </p>
-<pre class="fragment">int gmlRNA (char *string,
+</pre></div><p> Produce a secondary structure graph in PostScript including additional annotation macros and write it to 'filename'. </p>
+<div class="fragment"><pre class="fragment">
+int gmlRNA (char *string,
char *structure,
char *ssfile,
char option)
-</pre><p> Produce a secondary structure graph in Graph Meta Language (gml) and write it to a file. </p>
-<pre class="fragment">int ssv_rna_plot (char *string,
+</pre></div><p> Produce a secondary structure graph in Graph Meta Language (gml) and write it to a file. </p>
+<div class="fragment"><pre class="fragment">
+int ssv_rna_plot (char *string,
char *structure,
char *ssfile)
-</pre><p> Produce a secondary structure graph in SStructView format. </p>
-<pre class="fragment">int svg_rna_plot (char *string,
+</pre></div><p> Produce a secondary structure graph in SStructView format. </p>
+<div class="fragment"><pre class="fragment">
+int svg_rna_plot (char *string,
char *structure,
char *ssfile)
-</pre><p> Produce a secondary structure plot in SVG format and write it to a file. </p>
-<pre class="fragment">int xrna_plot ( char *string,
+</pre></div><p> Produce a secondary structure plot in SVG format and write it to a file. </p>
+<div class="fragment"><pre class="fragment">
+int xrna_plot ( char *string,
char *structure,
char *ssfile)
-</pre><p> Produce a secondary structure plot for further editing in XRNA. </p>
-<pre class="fragment">int rna_plot_type
-</pre><p> Switch for changing the secondary structure layout algorithm. </p>
+</pre></div><p> Produce a secondary structure plot for further editing in XRNA. </p>
+<div class="fragment"><pre class="fragment">
+int rna_plot_type
+</pre></div><p> Switch for changing the secondary structure layout algorithm. </p>
<p>Two low-level functions provide direct access to the graph lauyouting algorithms:</p>
-<pre class="fragment">int simple_xy_coordinates ( short *pair_table,
+<div class="fragment"><pre class="fragment">
+int simple_xy_coordinates ( short *pair_table,
float *X,
float *Y)
-</pre><p> Calculate nucleotide coordinates for secondary structure plot the <em>Simple way</em> </p>
-<pre class="fragment">int naview_xy_coordinates ( short *pair_table,
+</pre></div><p> Calculate nucleotide coordinates for secondary structure plot the <em>Simple way</em>. </p>
+<div class="fragment"><pre class="fragment">
+int naview_xy_coordinates ( short *pair_table,
float *X,
float *Y)
-</pre> <dl class="section see"><dt>See also:</dt><dd><a class="el" href="PS__dot_8h.html" title="Various functions for plotting RNA secondary structures, dot-plots and other visualizations.">PS_dot.h</a> and <a class="el" href="naview_8h.html">naview.h</a> for more detailed descriptions.</dd></dl>
+</pre></div><p> </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="PS__dot_8h.html" title="Various functions for plotting RNA secondary structures, dot-plots and other visualizations...">PS_dot.h</a> and <a class="el" href="naview_8h.html">naview.h</a> for more detailed descriptions.</dd></dl>
<hr>
<a href="#toc">Table of Contents</a>
<hr>
-<h1><a class="anchor" id="utils_dot"></a>
-Producing (colored) dot plots for base pair probabilities</h1>
-<pre class="fragment">int PS_color_dot_plot ( char *string,
+<h2><a class="anchor" id="utils_dot">
+Producing (colored) dot plots for base pair probabilities</a></h2>
+<div class="fragment"><pre class="fragment">
+int PS_color_dot_plot ( char *string,
cpair *pi,
char *filename)
-</pre> <pre class="fragment">int PS_color_dot_plot_turn (char *seq,
+</pre></div><p> </p>
+<div class="fragment"><pre class="fragment">
+int PS_color_dot_plot_turn (char *seq,
cpair *pi,
char *filename,
int winSize)
-</pre> <pre class="fragment">int PS_dot_plot_list (char *seq,
+</pre></div><p> </p>
+<div class="fragment"><pre class="fragment">
+int PS_dot_plot_list (char *seq,
char *filename,
plist *pl,
plist *mf,
char *comment)
-</pre><p> Produce a postscript dot-plot from two pair lists. </p>
-<pre class="fragment">int PS_dot_plot_turn (char *seq,
+</pre></div><p> Produce a postscript dot-plot from two pair lists. </p>
+<div class="fragment"><pre class="fragment">
+int PS_dot_plot_turn (char *seq,
struct plist *pl,
char *filename,
int winSize)
-</pre> <dl class="section see"><dt>See also:</dt><dd><a class="el" href="PS__dot_8h.html" title="Various functions for plotting RNA secondary structures, dot-plots and other visualizations.">PS_dot.h</a> for more detailed descriptions.</dd></dl>
-<h1><a class="anchor" id="utils_aln"></a>
-Producing (colored) alignments</h1>
-<pre class="fragment">int PS_color_aln (
+</pre></div><p> </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="PS__dot_8h.html" title="Various functions for plotting RNA secondary structures, dot-plots and other visualizations...">PS_dot.h</a> for more detailed descriptions.</dd></dl>
+<h2><a class="anchor" id="utils_aln">
+Producing (colored) alignments</a></h2>
+<div class="fragment"><pre class="fragment">
+int PS_color_aln (
const char *structure,
const char *filename,
const char *seqs[],
const char *names[])
-</pre>
+</pre></div><p> </p>
+
<hr>
<a href="#toc">Table of Contents</a>
<hr>
-<h1><a class="anchor" id="utils_seq"></a>
-RNA sequence related utilities</h1>
+<h2><a class="anchor" id="utils_seq">
+RNA sequence related utilities</a></h2>
<p>Several functions provide useful applications to RNA sequences</p>
-<pre class="fragment">char *random_string (int l,
+<div class="fragment"><pre class="fragment">
+char *random_string (int l,
const char symbols[])
-</pre><p> Create a random string using characters from a specified symbol set. </p>
-<pre class="fragment">int hamming ( const char *s1,
+</pre></div><p> Create a random string using characters from a specified symbol set. </p>
+<div class="fragment"><pre class="fragment">
+int hamming ( const char *s1,
const char *s2)
-</pre><p> Calculate hamming distance between two sequences. </p>
-<pre class="fragment">void str_DNA2RNA(char *sequence);
-</pre><p> Convert a DNA input sequence to RNA alphabet. </p>
-<pre class="fragment">void str_uppercase(char *sequence);
-</pre><p> Convert an input sequence to uppercase. </p>
+</pre></div><p> Calculate hamming distance between two sequences. </p>
+<div class="fragment"><pre class="fragment">
+void str_DNA2RNA(char *sequence);
+</pre></div><p> Convert a DNA input sequence to RNA alphabet. </p>
+<div class="fragment"><pre class="fragment">
+void str_uppercase(char *sequence);
+</pre></div><p> Convert an input sequence to uppercase. </p>
<hr>
<a href="#toc">Table of Contents</a>
<hr>
-<h1><a class="anchor" id="utils_struc"></a>
-RNA secondary structure related utilities</h1>
-<pre class="fragment">char *pack_structure (const char *struc)
-</pre><p> Pack secondary secondary structure, 5:1 compression using base 3 encoding. </p>
-<pre class="fragment">char *unpack_structure (const char *packed)
-</pre><p> Unpack secondary structure previously packed with <a class="el" href="utils_8h.html#ac6dfa5e22928c087c6e09ff0054a7ced" title="Pack secondary secondary structure, 5:1 compression using base 3 encoding.">pack_structure()</a> </p>
-<pre class="fragment">short *make_pair_table (const char *structure)
-</pre><p> Create a pair table of a secondary structure. </p>
-<pre class="fragment">short *copy_pair_table (const short *pt)
-</pre><p> Get an exact copy of a pair table. </p>
+<h2><a class="anchor" id="utils_struc">
+RNA secondary structure related utilities</a></h2>
+<div class="fragment"><pre class="fragment">
+char *pack_structure (const char *struc)
+</pre></div><p> Pack secondary secondary structure, 5:1 compression using base 3 encoding. </p>
+<div class="fragment"><pre class="fragment">
+char *unpack_structure (const char *packed)
+</pre></div><p> Unpack secondary structure previously packed with <a class="el" href="utils_8h.html#ac6dfa5e22928c087c6e09ff0054a7ced" title="Pack secondary secondary structure, 5:1 compression using base 3 encoding.">pack_structure()</a>. </p>
+<div class="fragment"><pre class="fragment">
+short *make_pair_table (const char *structure)
+</pre></div><p> Create a pair table of a secondary structure. </p>
+<div class="fragment"><pre class="fragment">
+short *copy_pair_table (const short *pt)
+</pre></div><p> Get an exact copy of a pair table. </p>
<hr>
<a href="#toc">Table of Contents</a>
<hr>
-<h1><a class="anchor" id="utils_misc"></a>
-Miscellaneous Utilities</h1>
-<pre class="fragment">void print_tty_input_seq (void)
-</pre><p> Print a line to <em>stdout</em> that asks for an input sequence. </p>
-<pre class="fragment">void print_tty_constraint_full (void)
-</pre><p> Print structure constraint characters to stdout (full constraint support) </p>
-<pre class="fragment">void print_tty_constraint (unsigned int option)
-</pre><p> Print structure constraint characters to stdout. (constraint support is specified by option parameter) </p>
-<pre class="fragment">int *get_iindx (unsigned int length)
-</pre><p> Get an index mapper array (iindx) for accessing the energy matrices, e.g. in partition function related functions. </p>
-<pre class="fragment">int *get_indx (unsigned int length)
-</pre><p> Get an index mapper array (indx) for accessing the energy matrices, e.g. in MFE related functions. </p>
-<pre class="fragment">void constrain_ptypes (
+<h2><a class="anchor" id="utils_misc">
+Miscellaneous Utilities</a></h2>
+<div class="fragment"><pre class="fragment">
+void print_tty_input_seq (void)
+</pre></div><p> Print a line to <em>stdout</em> that asks for an input sequence. </p>
+<div class="fragment"><pre class="fragment">
+void print_tty_constraint_full (void)
+</pre></div><p> Print structure constraint characters to stdout (full constraint support). </p>
+<div class="fragment"><pre class="fragment">
+void print_tty_constraint (unsigned int option)
+</pre></div><p> Print structure constraint characters to stdout. (constraint support is specified by option parameter). </p>
+<div class="fragment"><pre class="fragment">
+int *get_iindx (unsigned int length)
+</pre></div><p> Get an index mapper array (iindx) for accessing the energy matrices, e.g. in partition function related functions. </p>
+<div class="fragment"><pre class="fragment">
+int *get_indx (unsigned int length)
+</pre></div><p> Get an index mapper array (indx) for accessing the energy matrices, e.g. in MFE related functions. </p>
+<div class="fragment"><pre class="fragment">
+void constrain_ptypes (
const char *constraint,
unsigned int length,
char *ptype,
int *BP,
int min_loop_size,
unsigned int idx_type)
-</pre><p> Insert constraining pair types according to constraint structure string. </p>
-<pre class="fragment">char *get_line(FILE *fp);
-</pre><p> Read a line of arbitrary length from a stream. </p>
-<pre class="fragment">unsigned int read_record(
+</pre></div><p> Insert constraining pair types according to constraint structure string. </p>
+<div class="fragment"><pre class="fragment">
+char *get_line(FILE *fp);
+</pre></div><p> Read a line of arbitrary length from a stream. </p>
+<div class="fragment"><pre class="fragment">
+unsigned int read_record(
char **header,
char **sequence,
char ***rest,
unsigned int options);
-</pre><p> Get a data record from stdin. </p>
-<pre class="fragment">char *time_stamp (void)
-</pre><p> Get a timestamp. </p>
-<pre class="fragment">void warn_user (const char message[])
-</pre><p> Print a warning message. </p>
-<pre class="fragment">void nrerror (const char message[])
-</pre><p> Die with an error message. </p>
-<pre class="fragment">void init_rand (void)
-</pre><p> Make random number seeds. </p>
-<pre class="fragment">unsigned short xsubi[3];
-</pre><p> Current 48 bit random number. </p>
-<pre class="fragment">double urn (void)
-</pre><p> get a random number from [0..1] </p>
-<pre class="fragment">int int_urn (int from, int to)
-</pre><p> Generates a pseudo random integer in a specified range. </p>
-<pre class="fragment">void *space (unsigned size)
-</pre><p> Allocate space safely. </p>
-<pre class="fragment">void *xrealloc ( void *p,
+</pre></div><p> Get a data record from stdin. </p>
+<div class="fragment"><pre class="fragment">
+char *time_stamp (void)
+</pre></div><p> Get a timestamp. </p>
+<div class="fragment"><pre class="fragment">
+void warn_user (const char message[])
+</pre></div><p> Print a warning message. </p>
+<div class="fragment"><pre class="fragment">
+void nrerror (const char message[])
+</pre></div><p> Die with an error message. </p>
+<div class="fragment"><pre class="fragment">
+void init_rand (void)
+</pre></div><p> Make random number seeds. </p>
+<div class="fragment"><pre class="fragment">
+unsigned short xsubi[3];
+</pre></div><p> Current 48 bit random number. </p>
+<div class="fragment"><pre class="fragment">
+double urn (void)
+</pre></div><p> get a random number from [0..1] </p>
+<div class="fragment"><pre class="fragment">
+int int_urn (int from, int to)
+</pre></div><p> Generates a pseudo random integer in a specified range. </p>
+<div class="fragment"><pre class="fragment">
+void *space (unsigned size)
+</pre></div><p> Allocate space safely. </p>
+<div class="fragment"><pre class="fragment">
+void *xrealloc ( void *p,
unsigned size)
-</pre><p> Reallocate space safely. </p>
-<dl class="section see"><dt>See also:</dt><dd><a class="el" href="utils_8h.html" title="Various utility- and helper-functions used throughout the Vienna RNA package.">utils.h</a> for a complete overview and detailed description of the utility functions</dd></dl>
+</pre></div><p> Reallocate space safely. </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utils_8h.html" title="Various utility- and helper-functions used throughout the Vienna RNA package.">utils.h</a> for a complete overview and detailed description of the utility functions</dd></dl>
<hr>
<a href="#toc">Table of Contents</a>
<hr>
<p><a class="el" href="mp_example.html">Next Page: Examples</a> </p>
-</div></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="footer">Generated on Wed Jul 24 2013 13:38:59 for RNAlib-2.1.2 by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
- </ul>
</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on 11 Apr 2017 for RNAlib-2.1.2 by
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>