RNAlib-2.3.1
Scripting Language interface(s)

Notes on functions and structures wrapped to the scripting language interface(s)

Introduction

For an easy integration into scripting languages, we provide an automatically generated interface to the RNAlib C-library, generated with scripting.

Function renaming scheme

The main difference when using a scripting language interface compared to direct calls of RNAlib C functions is, that the prefix 'vrna_' is dropped. For instance, when calling the vrna_fold() function, corresponding calls in perl or python are RNA::fold(), and RNA.fold(), respectively.

Functions that are dedicated to work on specific data structures only, e.g. the vrna_fold_compound_t, are usually not exported at all. Instead, they are attached as object methods of a corresponding class (see Object oriented Interface for data structures for detailed information).

Object oriented Interface for data structures

For data structures, typedefs, and enumerations the 'vrna_' prefixes are dropped as well, together with their suffixes '_s', '_t', and '_e', respectively. Furthermore, data structures are usually transformed into classes and relevant functions of the C-library are attached as methods.

Examples

Examples on the basic usage of the scripting language interfaces can be found in the Perl Examples and Python Examples section.

Wrapper notes

Special notes on how functions, structures, enums, and macro definitions are actually wrapped, can be found here: SWIG Wrapper Notes.