RNAlib-2.4.14
Layouts and Coordinates

Functions to compute coordinate layouts for secondary structure plots. More...

Detailed Description

Functions to compute coordinate layouts for secondary structure plots.

+ Collaboration diagram for Layouts and Coordinates:

Data Structures

struct  vrna_plot_layout_s
 
struct  vrna_plot_options_puzzler_t
 Options data structure for RNApuzzler algorithm implementation. More...
 

Macros

#define VRNA_PLOT_TYPE_SIMPLE   0
 Definition of Plot type simple More...
 
#define VRNA_PLOT_TYPE_NAVIEW   1
 Definition of Plot type Naview More...
 
#define VRNA_PLOT_TYPE_CIRCULAR   2
 Definition of Plot type Circular More...
 
#define VRNA_PLOT_TYPE_TURTLE   3
 Definition of Plot type Turtle [23].
 
#define VRNA_PLOT_TYPE_PUZZLER   4
 Definition of Plot type RNApuzzler [23].
 

Typedefs

typedef struct vrna_plot_layout_s vrna_plot_layout_t
 RNA secondary structure figure layout. More...
 

Functions

vrna_plot_layout_tvrna_plot_layout (const char *structure, unsigned int plot_type)
 Create a layout (coordinates, etc.) for a secondary structure plot. More...
 
vrna_plot_layout_tvrna_plot_layout_simple (const char *structure)
 Create a layout (coordinates, etc.) for a simple secondary structure plot. More...
 
vrna_plot_layout_tvrna_plot_layout_naview (const char *structure)
 Create a layout (coordinates, etc.) for a secondary structure plot using the Naview Algorithm [5]. More...
 
vrna_plot_layout_tvrna_plot_layout_circular (const char *structure)
 Create a layout (coordinates, etc.) for a circular secondary structure plot. More...
 
vrna_plot_layout_tvrna_plot_layout_turtle (const char *structure)
 Create a layout (coordinates, etc.) for a secondary structure plot using the Turtle Algorithm [23]. More...
 
vrna_plot_layout_tvrna_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 [23]. More...
 
void vrna_plot_layout_free (vrna_plot_layout_t *layout)
 Free memory occupied by a figure layout data structure. More...
 
int vrna_plot_coords (const char *structure, float **x, float **y, int plot_type)
 Compute nucleotide coordinates for secondary structure plot. More...
 
int vrna_plot_coords_pt (const short *pt, float **x, float **y, int plot_type)
 Compute nucleotide coordinates for secondary structure plot. More...
 
int vrna_plot_coords_simple (const char *structure, float **x, float **y)
 Compute nucleotide coordinates for secondary structure plot the Simple way More...
 
int vrna_plot_coords_simple_pt (const short *pt, float **x, float **y)
 Compute nucleotide coordinates for secondary structure plot the Simple way More...
 
int vrna_plot_coords_circular (const char *structure, float **x, float **y)
 Compute coordinates of nucleotides mapped in equal distancies onto a unit circle. More...
 
int vrna_plot_coords_circular_pt (const short *pt, float **x, float **y)
 Compute nucleotide coordinates for a Circular Plot More...
 
int vrna_plot_coords_naview (const char *structure, float **x, float **y)
 Compute nucleotide coordinates for secondary structure plot using the Naview algorithm [5]. More...
 
int vrna_plot_coords_naview_pt (const short *pt, float **x, float **y)
 Compute nucleotide coordinates for secondary structure plot using the Naview algorithm [5]. More...
 
int vrna_plot_coords_puzzler (const char *structure, float **x, float **y, double **arc_coords, vrna_plot_options_puzzler_t *options)
 Compute nucleotide coordinates for secondary structure plot using the RNApuzzler algorithm [23]. More...
 
int vrna_plot_coords_puzzler_pt (short const *const pair_table, float **x, float **y, double **arc_coords, vrna_plot_options_puzzler_t *puzzler)
 Compute nucleotide coordinates for secondary structure plot using the RNApuzzler algorithm [23]. More...
 
vrna_plot_options_puzzler_tvrna_plot_options_puzzler (void)
 Create an RNApuzzler options data structure. More...
 
void vrna_plot_options_puzzler_free (vrna_plot_options_puzzler_t *options)
 Free memory occupied by an RNApuzzler options data structure. More...
 
int vrna_plot_coords_turtle (const char *structure, float **x, float **y, double **arc_coords)
 Compute nucleotide coordinates for secondary structure plot using the RNAturtle algorithm [23]. More...
 
int vrna_plot_coords_turtle_pt (short const *const pair_table, float **x, float **y, double **arc_coords)
 Compute nucleotide coordinates for secondary structure plot using the RNAturtle algorithm [23]. More...
 

Data Structure Documentation

struct vrna_plot_layout_s
struct vrna_plot_options_puzzler_t

Options data structure for RNApuzzler algorithm implementation.

Macro Definition Documentation

#define VRNA_PLOT_TYPE_SIMPLE   0

#include <ViennaRNA/plotting/layouts.h>

Definition of Plot type simple

This is the plot type definition for several RNA structure plotting functions telling them to use Simple plotting algorithm

See also
rna_plot_type, vrna_file_PS_rnaplot_a(), vrna_file_PS_rnaplot(), svg_rna_plot(), gmlRNA(), ssv_rna_plot(), xrna_plot()
#define VRNA_PLOT_TYPE_NAVIEW   1

#include <ViennaRNA/plotting/layouts.h>

Definition of Plot type Naview

This is the plot type definition for several RNA structure plotting functions telling them to use Naview plotting algorithm [5].

See also
rna_plot_type, vrna_file_PS_rnaplot_a(), vrna_file_PS_rnaplot(), svg_rna_plot(), gmlRNA(), ssv_rna_plot(), xrna_plot()
#define VRNA_PLOT_TYPE_CIRCULAR   2

#include <ViennaRNA/plotting/layouts.h>

Definition of Plot type Circular

This is the plot type definition for several RNA structure plotting functions telling them to produce a Circular plot

See also
rna_plot_type, vrna_file_PS_rnaplot_a(), vrna_file_PS_rnaplot(), svg_rna_plot(), gmlRNA(), ssv_rna_plot(), xrna_plot()

Typedef Documentation

Function Documentation

vrna_plot_layout_t* vrna_plot_layout ( const char *  structure,
unsigned int  plot_type 
)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a secondary structure plot.

This function can be used to create a secondary structure nucleotide layout that is then further processed by an actual plotting function. The layout algorithm can be specified using the plot_type parameter, and the following algorithms are currently supported:

Passing an unsupported selection leads to the default algorithm VRNA_PLOT_TYPE_NAVIEW

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout_simple(), vrna_plot_layout_naview(), vrna_plot_layout_circular(), vrna_plot_layout_turtle(), vrna_plot_layout_puzzler(), vrna_plot_coords(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
plot_typeThe layout algorithm to be used
Returns
The layout data structure for the provided secondary structure
vrna_plot_layout_t* vrna_plot_layout_simple ( const char *  structure)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a simple secondary structure plot.

This function basically is a wrapper to vrna_plot_layout() that passes the plot_type VRNA_PLOT_TYPE_SIMPLE.

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords_simple() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout(), vrna_plot_layout_naview(), vrna_plot_layout_circular(), vrna_plot_layout_turtle(), vrna_plot_layout_puzzler(), vrna_plot_coords_simple(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
Returns
The layout data structure for the provided secondary structure
vrna_plot_layout_t* vrna_plot_layout_naview ( const char *  structure)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a secondary structure plot using the Naview Algorithm [5].

This function basically is a wrapper to vrna_plot_layout() that passes the plot_type VRNA_PLOT_TYPE_NAVIEW.

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords_naview() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout(), vrna_plot_layout_simple(), vrna_plot_layout_circular(), vrna_plot_layout_turtle(), vrna_plot_layout_puzzler(), vrna_plot_coords_naview(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
Returns
The layout data structure for the provided secondary structure
vrna_plot_layout_t* vrna_plot_layout_circular ( const char *  structure)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a circular secondary structure plot.

This function basically is a wrapper to vrna_plot_layout() that passes the plot_type VRNA_PLOT_TYPE_CIRCULAR.

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords_circular() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout(), vrna_plot_layout_naview(), vrna_plot_layout_simple(), vrna_plot_layout_turtle(), vrna_plot_layout_puzzler(), vrna_plot_coords_circular(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
Returns
The layout data structure for the provided secondary structure
vrna_plot_layout_t* vrna_plot_layout_turtle ( const char *  structure)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a secondary structure plot using the Turtle Algorithm [23].

This function basically is a wrapper to vrna_plot_layout() that passes the plot_type VRNA_PLOT_TYPE_TURTLE.

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords_turtle() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout(), vrna_plot_layout_simple(), vrna_plot_layout_circular(), vrna_plot_layout_naview(), vrna_plot_layout_puzzler(), vrna_plot_coords_turtle(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
Returns
The layout data structure for the provided secondary structure
vrna_plot_layout_t* vrna_plot_layout_puzzler ( const char *  structure,
vrna_plot_options_puzzler_t options 
)

#include <ViennaRNA/plotting/layouts.h>

Create a layout (coordinates, etc.) for a secondary structure plot using the RNApuzzler Algorithm [23].

This function basically is a wrapper to vrna_plot_layout() that passes the plot_type VRNA_PLOT_TYPE_PUZZLER.

Note
If only X-Y coordinates of the corresponding structure layout are required, consider using vrna_plot_coords_puzzler() instead!
See also
vrna_plot_layout_free(), vrna_plot_layout(), vrna_plot_layout_simple(), vrna_plot_layout_circular(), vrna_plot_layout_naview(), vrna_plot_layout_turtle(), vrna_plot_coords_puzzler(), vrna_file_PS_rnaplot_layout()
Parameters
structureThe secondary structure in dot-bracket notation
Returns
The layout data structure for the provided secondary structure
void vrna_plot_layout_free ( vrna_plot_layout_t layout)

#include <ViennaRNA/plotting/layouts.h>

Free memory occupied by a figure layout data structure.

See also
vrna_plot_layout_t, vrna_plot_layout(), vrna_plot_layout_simple(), vrna_plot_layout_circular(), vrna_plot_layout_naview(), vrna_plot_layout_turtle(), vrna_plot_layout_puzzler(), vrna_file_PS_rnaplot_layout()
Parameters
layoutThe layout data structure to free
int vrna_plot_coords ( const char *  structure,
float **  x,
float **  y,
int  plot_type 
)

#include <ViennaRNA/plotting/layouts.h>

Compute nucleotide coordinates for secondary structure plot.

This function takes a secondary structure and computes X-Y coordinates for each nucleotide that then can be used to create a structure plot. The parameter plot_type is used to select the underlying layout algorithm. Currently, the following selections are provided:

Passing an unsupported selection leads to the default algorithm VRNA_PLOT_TYPE_NAVIEW

Here is a simple example how to use this function, assuming variable structure contains a valid dot-bracket string:

float *x, *y;
if (vrna_plot_coords(structure, &x, &y)) {
printf("all fine");
} else {
printf("some failure occured!");
}
free(x);
free(y);
Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_simple(), vrna_plot_coords_naview() vrna_plot_coords_circular(), vrna_plot_coords_turtle(), vrna_plot_coords_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
plot_typeThe layout algorithm to be used
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_pt ( const short *  pt,
float **  x,
float **  y,
int  plot_type 
)

#include <ViennaRNA/plotting/layouts.h>

Compute nucleotide coordinates for secondary structure plot.

Same as vrna_plot_coords() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_simple_pt(), vrna_plot_coords_naview_pt() vrna_plot_coords_circular_pt(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_puzzler_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
plot_typeThe layout algorithm to be used
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_simple ( const char *  structure,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/layouts.h>

Compute nucleotide coordinates for secondary structure plot the Simple way

This function basically is a wrapper to vrna_plot_coords() that passes the plot_type VRNA_PLOT_TYPE_SIMPLE.

Here is a simple example how to use this function, assuming variable structure contains a valid dot-bracket string:

float *x, *y;
if (vrna_plot_coords_simple(structure, &x, &y)) {
printf("all fine");
} else {
printf("some failure occured!");
}
free(x);
free(y);
Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_simple_pt(), vrna_plot_coords_circular(), vrna_plot_coords_naview(), vrna_plot_coords_turtle(), vrna_plot_coords_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_simple_pt ( const short *  pt,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/layouts.h>

Compute nucleotide coordinates for secondary structure plot the Simple way

Same as vrna_plot_coords_simple() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_simple(), vrna_plot_coords_circular_pt(), vrna_plot_coords_naview_pt(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_puzzler_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_circular ( const char *  structure,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/layouts.h>

Compute coordinates of nucleotides mapped in equal distancies onto a unit circle.

This function basically is a wrapper to vrna_plot_coords() that passes the plot_type VRNA_PLOT_TYPE_CIRCULAR.

In order to draw nice arcs using quadratic bezier curves that connect base pairs one may calculate a second tangential point $P^t$ in addition to the actual R2 coordinates. the simplest way to do so may be to compute a radius scaling factor $rs$ in the interval $[0,1]$ that weights the proportion of base pair span to the actual length of the sequence. This scaling factor can then be used to calculate the coordinates for $P^t$, i.e.

\[ P^{t}_x[i] = X[i] * rs \]

and

\[ P^{t}_y[i] = Y[i] * rs \]

.

Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_circular_pt(), vrna_plot_coords_simple(), vrna_plot_coords_naview(), vrna_plot_coords_turtle(), vrna_plot_coords_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_circular_pt ( const short *  pt,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/layouts.h>

Compute nucleotide coordinates for a Circular Plot

Same as vrna_plot_coords_circular() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_circular(), vrna_plot_coords_simple_pt(), vrna_plot_coords_naview_pt(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_puzzler_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_naview ( const char *  structure,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/naview.h>

Compute nucleotide coordinates for secondary structure plot using the Naview algorithm [5].

This function basically is a wrapper to vrna_plot_coords() that passes the plot_type VRNA_PLOT_TYPE_NAVIEW.

Here is a simple example how to use this function, assuming variable structure contains a valid dot-bracket string:

float *x, *y;
if (vrna_plot_coords_naview(structure, &x, &y)) {
printf("all fine");
} else {
printf("some failure occured!");
}
free(x);
free(y);
Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_simple_pt(), vrna_plot_coords_circular(), vrna_plot_coords_simple(), vrna_plot_coords_turtle(), vrna_plot_coords_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_naview_pt ( const short *  pt,
float **  x,
float **  y 
)

#include <ViennaRNA/plotting/naview.h>

Compute nucleotide coordinates for secondary structure plot using the Naview algorithm [5].

Same as vrna_plot_coords_naview() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X and Y coordinates and assigns the pointers at addressess x and y to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_naview(), vrna_plot_coords_circular_pt(), vrna_plot_coords_simple_pt(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_puzzler_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_puzzler ( const char *  structure,
float **  x,
float **  y,
double **  arc_coords,
vrna_plot_options_puzzler_t options 
)

#include <ViennaRNA/plotting/RNApuzzler/RNApuzzler.h>

Compute nucleotide coordinates for secondary structure plot using the RNApuzzler algorithm [23].

This function basically is a wrapper to vrna_plot_coords() that passes the plot_type VRNA_PLOT_TYPE_PUZZLER.

Here is a simple example how to use this function, assuming variable structure contains a valid dot-bracket string and using the default options (options = NULL):

float *x, *y;
double *arcs;
if (vrna_plot_coords_puzzler(structure, &x, &y, &arcs, NULL)) {
printf("all fine");
} else {
printf("some failure occured!");
}
free(x);
free(y);
free(arcs);
Note
On success, this function allocates memory for X, Y and arc coordinates and assigns the pointers at addressess x, y and to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_puzzler_pt(), vrna_plot_coords_circular(), vrna_plot_coords_simple(), vrna_plot_coords_turtle(), vrna_plot_coords_naview(), vrna_plot_options_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
[in,out]arc_coordsThe address of a pointer that will hold arc coordinates (pointer will point to memory, or NULL on failure)
optionsThe options for the RNApuzzler algorithm (or NULL)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_puzzler_pt ( short const *const  pair_table,
float **  x,
float **  y,
double **  arc_coords,
vrna_plot_options_puzzler_t puzzler 
)

#include <ViennaRNA/plotting/RNApuzzler/RNApuzzler.h>

Compute nucleotide coordinates for secondary structure plot using the RNApuzzler algorithm [23].

Same as vrna_plot_coords_puzzler() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X, Y and arc coordinates and assigns the pointers at addressess x, y and to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_puzzler(), vrna_plot_coords_circular_pt(), vrna_plot_coords_simple_pt(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_naview_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
[in,out]arc_coordsThe address of a pointer that will hold arc coordinates (pointer will point to memory, or NULL on failure)
optionsThe options for the RNApuzzler algorithm (or NULL)
Returns
The length of the structure on success, 0 otherwise
vrna_plot_options_puzzler_t* vrna_plot_options_puzzler ( void  )

#include <ViennaRNA/plotting/RNApuzzler/RNApuzzler.h>

Create an RNApuzzler options data structure.

See also
vrna_plot_options_puzzler_free(), vrna_plot_coords_puzzler(), vrna_plot_coords_puzzler_pt(), vrna_plot_layout_puzzler()
Returns
An RNApuzzler options data structure with default settings
void vrna_plot_options_puzzler_free ( vrna_plot_options_puzzler_t options)

#include <ViennaRNA/plotting/RNApuzzler/RNApuzzler.h>

Free memory occupied by an RNApuzzler options data structure.

See also
vrna_plot_options_puzzler(), vrna_plot_coords_puzzler(), vrna_plot_coords_puzzler_pt(), vrna_plot_layout_puzzler()
Parameters
optionsA pointer to the options data structure to free
int vrna_plot_coords_turtle ( const char *  structure,
float **  x,
float **  y,
double **  arc_coords 
)

#include <ViennaRNA/plotting/RNApuzzler/RNAturtle.h>

Compute nucleotide coordinates for secondary structure plot using the RNAturtle algorithm [23].

This function basically is a wrapper to vrna_plot_coords() that passes the plot_type VRNA_PLOT_TYPE_TURTLE.

Here is a simple example how to use this function, assuming variable structure contains a valid dot-bracket string:

float *x, *y;
double *arcs;
if (vrna_plot_coords_turtle(structure, &x, &y, &arcs)) {
printf("all fine");
} else {
printf("some failure occured!");
}
free(x);
free(y);
free(arcs);
Note
On success, this function allocates memory for X, Y and arc coordinates and assigns the pointers at addressess x, y and to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords(), vrna_plot_coords_turtle_pt(), vrna_plot_coords_circular(), vrna_plot_coords_simple(), vrna_plot_coords_naview(), vrna_plot_coords_puzzler()
Parameters
structureThe secondary structure in dot-bracket notation
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
[in,out]arc_coordsThe address of a pointer that will hold arc coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise
int vrna_plot_coords_turtle_pt ( short const *const  pair_table,
float **  x,
float **  y,
double **  arc_coords 
)

#include <ViennaRNA/plotting/RNApuzzler/RNAturtle.h>

Compute nucleotide coordinates for secondary structure plot using the RNAturtle algorithm [23].

Same as vrna_plot_coords_turtle() but takes a pair table with the structure information as input.

Note
On success, this function allocates memory for X, Y and arc coordinates and assigns the pointers at addressess x, y and to the corresponding memory locations. It's the users responsibility to cleanup this memory after usage!
See also
vrna_plot_coords_pt(), vrna_plot_coords_turtle(), vrna_plot_coords_circular_pt(), vrna_plot_coords_simple_pt(), vrna_plot_coords_puzzler_pt(), vrna_plot_coords_naview_pt()
Parameters
ptThe pair table that holds the secondary structure
[in,out]xThe address of a pointer of X coordinates (pointer will point to memory, or NULL on failure)
[in,out]yThe address of a pointer of Y coordinates (pointer will point to memory, or NULL on failure)
[in,out]arc_coordsThe address of a pointer that will hold arc coordinates (pointer will point to memory, or NULL on failure)
Returns
The length of the structure on success, 0 otherwise