RNAlib-2.5.1
layouts.h
Go to the documentation of this file.
1#ifndef VIENNA_RNA_PACKAGE_PLOT_LAYOUTS_H
2#define VIENNA_RNA_PACKAGE_PLOT_LAYOUTS_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
37
38
40
41#ifdef VRNA_WITH_NAVIEW_LAYOUT
42#include <ViennaRNA/plotting/naview/naview.h>
43#endif
44
47
48
57#define VRNA_PLOT_TYPE_SIMPLE 0
58
67#define VRNA_PLOT_TYPE_NAVIEW 1
68
77#define VRNA_PLOT_TYPE_CIRCULAR 2
78
83#define VRNA_PLOT_TYPE_TURTLE 3
84
89#define VRNA_PLOT_TYPE_PUZZLER 4
90
91#ifdef VRNA_WITH_NAVIEW_LAYOUT
92# define VRNA_PLOT_TYPE_DEFAULT VRNA_PLOT_TYPE_NAVIEW
93#else
94# define VRNA_PLOT_TYPE_DEFAULT VRNA_PLOT_TYPE_PUZZLER
95#endif
96
97
99 unsigned int length;
100 float *x;
101 float *y;
102 double *arcs;
103 int bbox[4];
104};
105
106
134vrna_plot_layout(const char *structure,
135 unsigned int plot_type);
136
137
154vrna_plot_layout_simple(const char *structure);
155
156
157#ifdef VRNA_WITH_NAVIEW_LAYOUT
174vrna_plot_layout_naview(const char *structure);
175#endif
176
193vrna_plot_layout_circular(const char *structure);
194
195
212vrna_plot_layout_turtle(const char *structure);
213
214
231vrna_plot_layout_puzzler(const char *structure,
233
234
244void
246
247
291int
292vrna_plot_coords(const char *structure,
293 float **x,
294 float **y,
295 int plot_type);
296
297
317int
318vrna_plot_coords_pt(const short *pt,
319 float **x,
320 float **y,
321 int plot_type);
322
323
356int
357vrna_plot_coords_simple(const char *structure,
358 float **x,
359 float **y);
360
361
380int
382 float **x,
383 float **y);
384
385
416int
417vrna_plot_coords_circular(const char *structure,
418 float **x,
419 float **y);
420
421
440int
442 float **x,
443 float **y);
444
445
451#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
452
463typedef struct {
464 float X; /* X coords */
465 float Y; /* Y coords */
466} COORDINATE;
467
468
481extern int rna_plot_type;
482
483
497DEPRECATED(int
498 simple_xy_coordinates(short *pair_table,
499 float *X,
500 float *Y),
501 "Use vrna_plot_coords_simple_pt() instead!");
502
503
526DEPRECATED(int
527 simple_circplot_coordinates(short *pair_table,
528 float *x,
529 float *y),
530 "Use vrna_plot_coords_circular_pt() instead!");
531
532
537#endif
538
539
540#endif
Implementation of the RNApuzzler RNA secondary structure layout algorithm .
Implementation of the RNAturtle RNA secondary structure layout algorithm .
Various data structures and pre-processor macros.
vrna_plot_layout_t * vrna_plot_layout_turtle(const char *structure)
Create a layout (coordinates, etc.) for a secondary structure plot using the Turtle Algorithm .
vrna_plot_layout_t * vrna_plot_layout_simple(const char *structure)
Create a layout (coordinates, etc.) for a simple secondary structure plot.
vrna_plot_layout_t * vrna_plot_layout_puzzler(const char *structure, vrna_plot_options_puzzler_t *options)
Create a layout (coordinates, etc.) for a secondary structure plot using the RNApuzzler Algorithm .
vrna_plot_layout_t * vrna_plot_layout(const char *structure, unsigned int plot_type)
Create a layout (coordinates, etc.) for a secondary structure plot.
int vrna_plot_coords(const char *structure, float **x, float **y, int plot_type)
Compute nucleotide coordinates for secondary structure plot.
int vrna_plot_coords_circular(const char *structure, float **x, float **y)
Compute coordinates of nucleotides mapped in equal distancies onto a unit circle.
int vrna_plot_coords_simple_pt(const short *pt, float **x, float **y)
Compute nucleotide coordinates for secondary structure plot the Simple way
void vrna_plot_layout_free(vrna_plot_layout_t *layout)
Free memory occupied by a figure layout data structure.
vrna_plot_layout_t * vrna_plot_layout_circular(const char *structure)
Create a layout (coordinates, etc.) for a circular secondary structure plot.
int vrna_plot_coords_pt(const short *pt, float **x, float **y, int plot_type)
Compute nucleotide coordinates for secondary structure plot.
int vrna_plot_coords_simple(const char *structure, float **x, float **y)
Compute nucleotide coordinates for secondary structure plot the Simple way
int vrna_plot_coords_circular_pt(const short *pt, float **x, float **y)
Compute nucleotide coordinates for a Circular Plot
Definition: layouts.h:98
Options data structure for RNApuzzler algorithm implementation.
Definition: RNApuzzler.h:20
int rna_plot_type
Switch for changing the secondary structure layout algorithm.
int simple_circplot_coordinates(short *pair_table, float *x, float *y)
Calculate nucleotide coordinates for Circular Plot
int simple_xy_coordinates(short *pair_table, float *X, float *Y)
Calculate nucleotide coordinates for secondary structure plot the Simple way
this is a workarround for the SWIG Perl Wrapper RNA plot function that returns an array of type COORD...
Definition: layouts.h:463