1 #ifndef __VIENNA_RNA_PACKAGE_PS_DOT_H__
2 #define __VIENNA_RNA_PACKAGE_PS_DOT_H__
4 #include "data_structures.h"
5 #include "plot_layouts.h"
8 #define DEPRECATED(func) func __attribute__ ((deprecated))
10 #define DEPRECATED(func) func
15 * \brief Various functions for plotting RNA secondary structures, dot-plots and other
19 /* write PostScript drawing of structure to file with annotation */
20 int PS_rna_plot_snoop_a(char *string,
27 * \brief Produce a secondary structure graph in PostScript and write it to 'filename'.
29 * Note that this function has changed from previous versions
30 * and now expects the structure to be plotted in dot-bracket notation as an
31 * argument. It does not make use of the global #base_pair array anymore.
33 * \param string The RNA sequence
34 * \param structure The secondary structure in dot-bracket notation
35 * \param file The filename of the postscript output
36 * \return 1 on success, 0 otherwise
38 int PS_rna_plot(char *string,
43 * \brief Produce a secondary structure graph in PostScript including additional
44 * annotation macros and write it to 'filename'
46 * Same as PS_rna_plot() but adds extra PostScript macros for various
47 * annotations (see generated PS code). The 'pre' and 'post'
48 * variables contain PostScript code that is verbatim copied in the
49 * resulting PS file just before and after the structure plot.
50 * If both arguments ('pre' and 'post') are NULL, no additional macros will
51 * be printed into the PostScript.
53 * \param string The RNA sequence
54 * \param structure The secondary structure in dot-bracket notation
55 * \param file The filename of the postscript output
56 * \param pre PostScript code to appear before the secondary structure plot
57 * \param post PostScript code to appear after the secondary structure plot
58 * \return 1 on success, 0 otherwise
60 int PS_rna_plot_a(char *string,
66 int PS_rna_plot_a_gquad(char *string,
73 * \brief Produce a secondary structure graph in Graph Meta Language (gml) and write it to a file
75 * If 'option' is an uppercase letter the RNA sequence is used to label nodes, if 'option' equals
76 * \a 'X' or \a 'x' the resulting file will coordinates for an initial layout of the graph.
78 * \param string The RNA sequence
79 * \param structure The secondary structure in dot-bracket notation
80 * \param ssfile The filename of the gml output
81 * \param option The option flag
82 * \return 1 on success, 0 otherwise
84 int gmlRNA( char *string,
90 * \brief Produce a secondary structure graph in SStructView format
92 * Write coord file for SStructView
94 * \param string The RNA sequence
95 * \param structure The secondary structure in dot-bracket notation
96 * \param ssfile The filename of the ssv output
97 * \return 1 on success, 0 otherwise
99 int ssv_rna_plot( char *string,
104 * \brief Produce a secondary structure plot in SVG format and write it to a file
106 * \param string The RNA sequence
107 * \param structure The secondary structure in dot-bracket notation
108 * \param ssfile The filename of the svg output
109 * \return 1 on success, 0 otherwise
111 int svg_rna_plot( char *string,
116 * \brief Produce a secondary structure plot for further editing in XRNA
118 * \param string The RNA sequence
119 * \param structure The secondary structure in dot-bracket notation
120 * \param ssfile The filename of the xrna output
121 * \return 1 on success, 0 otherwise
123 int xrna_plot(char *string,
127 int PS_color_dot_plot(char *string,
131 int PS_color_dot_plot_turn( char *seq,
137 * \brief Produce a postscript dot-plot from two pair lists
139 * This function reads two plist structures (e.g. base pair probabilities and a secondary structure)
140 * as produced by assign_plist_from_pr() and assign_plist_from_db() and produces a postscript
141 * "dot plot" that is written to 'filename'.\n
142 * Using base pair probabilities in the first and mfe structure in the second plist, the resulting
143 * "dot plot" represents each base pairing probability by a square of corresponding area in a upper
144 * triangle matrix. The lower part of the matrix contains the minimum free energy structure.
146 * \see assign_plist_from_pr(), assign_plist_from_db()
148 * \param seq The RNA sequence
149 * \param filename A filename for the postscript output
150 * \param pl The base pair probability pairlist
151 * \param mf The mfe secondary structure pairlist
152 * \param comment A comment
153 * \return 1 if postscript was successfully written, 0 otherwise
155 int PS_dot_plot_list( char *seq,
161 int PS_dot_plot_turn( char *seq,
166 int PS_color_aln( const char *structure,
167 const char *filename,
169 const char *names[]);
172 * PS_color_aln for duplexes
174 int aliPS_color_aln(const char *structure,
175 const char *filename,
177 const char *names[]);
181 * Wrapper to PS_dot_plot_list
183 * \brief Produce postscript dot-plot
185 * Reads base pair probabilities produced by pf_fold() from the
186 * global array #pr and the pair list #base_pair produced by
187 * fold() and produces a postscript "dot plot" that is written to
188 * 'filename'. The "dot plot" represents each base pairing
189 * probability by a square of corresponding area in a upper triangle
190 * matrix. The lower part of the matrix contains the minimum free energy
191 * \note DO NOT USE THIS FUNCTION ANYMORE SINCE IT IS NOT THREADSAFE
193 * \deprecated This function is deprecated and will be removed soon! Use \ref PS_dot_plot_list() instead!
195 DEPRECATED(int PS_dot_plot( char *string,