// global variables unsigned short xsubi[3] // global functions unsigned int vrna_sequence_length_max (unsigned int options) int vrna_nucleotide_IUPAC_identity ( char a, char b ) void vrna_ptypes_prepare ( vrna_fold_compound_t* fc, unsigned int options ) char* vrna_ptypes ( const short* S, vrna_md_t* md ) short* vrna_seq_encode ( const char* sequence, vrna_md_t* md ) short* vrna_seq_encode_simple ( const char* sequence, vrna_md_t* md ) int vrna_nucleotide_encode ( char c, vrna_md_t* md ) char vrna_nucleotide_decode ( int enc, vrna_md_t* md ) void vrna_aln_encode ( const char* sequence, short** S_p, short** s5_p, short** s3_p, char** ss_p, unsigned int** as_p, vrna_md_t* md ) unsigned int vrna_get_ptype_md ( int i, int j, vrna_md_t* md ) unsigned int vrna_get_ptype ( int ij, char* ptype ) unsigned int vrna_get_ptype_window ( int i, int j, char** ptype ) unsigned int** vrna_enumerate_necklaces (const unsigned int* type_counts) void* vrna_alloc (unsigned size) void* vrna_realloc ( void* p, unsigned size ) void vrna_message_error ( const char* format, ... ) void vrna_message_verror ( const char* format, va_list args ) void vrna_message_warning ( const char* format, ... ) void vrna_message_vwarning ( const char* format, va_list args ) void vrna_message_info ( FILE* fp, const char* format, ... ) void vrna_message_vinfo ( FILE* fp, const char* format, va_list args ) void vrna_init_rand (void) double vrna_urn (void) int vrna_int_urn ( int from, int to ) char* vrna_time_stamp (void) unsigned int get_input_line ( char** string, unsigned int options ) void vrna_message_input_seq_simple (void) void vrna_message_input_seq (const char* s) int* vrna_idx_row_wise (unsigned int length) int* vrna_idx_col_wise (unsigned int length) // macros #define MAX2( \ A, \ B \ ) #define MAX3( \ A, \ B, \ C \ ) #define MIN2( \ A, \ B \ ) #define MIN3( \ A, \ B, \ C \ ) #define PRIVATE #define PUBLIC #define VRNA_INPUT_BLANK_LINE #define VRNA_INPUT_COMMENT #define VRNA_INPUT_CONSTRAINT #define VRNA_INPUT_ERROR #define VRNA_INPUT_FASTA_HEADER #define VRNA_INPUT_MISC #define VRNA_INPUT_NOSKIP_BLANK_LINES #define VRNA_INPUT_NOSKIP_COMMENTS #define VRNA_INPUT_NO_REST #define VRNA_INPUT_NO_SPAN #define VRNA_INPUT_NO_TRUNCATION #define VRNA_INPUT_QUIT #define VRNA_INPUT_SEQUENCE
unsigned short xsubi [3]
This variable is used by vrna_urn() . These should be set to some random number seeds before the first call to vrna_urn() .
See also:
char* vrna_ptypes ( const short* S, vrna_md_t* md )
Note
This array is always indexed in column-wise order, in contrast to previously different indexing between mfe and pf variants!
See also:
short* vrna_seq_encode ( const char* sequence, vrna_md_t* md )
short* vrna_seq_encode_simple ( const char* sequence, vrna_md_t* md )
int vrna_nucleotide_encode ( char c, vrna_md_t* md )
This function encodes a nucleotide character to its numerical representation as required by many functions in RNAlib.
Parameters:
c | The nucleotide character to encode |
md | The model details that determine the kind of encoding |
Returns:
The encoded nucleotide
See also:
char vrna_nucleotide_decode ( int enc, vrna_md_t* md )
This function decodes a numerical representation of a nucleotide character back into nucleotide alphabet
Parameters:
enc | The encoded nucleotide |
md | The model details that determine the kind of decoding |
Returns:
The decoded nucleotide character
See also:
unsigned int** vrna_enumerate_necklaces (const unsigned int* type_counts)
This function implements A fast algorithm to generate necklaces with fixed content as published by Joe Sawada in 2003 [16] .
The function receives a list of counts (the elements on the necklace) for each type of object within a necklace. The list starts at index 0 and ends with an entry that has a count of 0. The algorithm then enumerates all non-cyclic permutations of the content, returned as a list of necklaces. This list, again, is zero-terminated, i.e. the last entry of the list is a NULL
pointer.
SWIG Wrapper Notes This function is available as global function enumerate_necklaces() which accepts lists input, an produces list of lists output.
Parameters:
type_counts | A 0-terminated list of entity counts |
Returns:
A list of all non-cyclic permutations of the entities
void* vrna_alloc (unsigned size)
Parameters:
size | The size of the memory to be allocated in bytes |
Returns:
A pointer to the allocated memory
void* vrna_realloc ( void* p, unsigned size )
Parameters:
p | A pointer to the memory region to be reallocated |
size | The size of the memory to be allocated in bytes |
Returns:
A pointer to the newly allocated memory
void vrna_message_error ( const char* format, ... )
This function is a wrapper to fprintf (stderr, …) that puts a capital ERROR: in front of the message and then exits the calling program.
Parameters:
format | The error message to be printed |
… | Optional arguments for the formatted message string |
See also:
vrna_message_verror() , vrna_message_warning() , vrna_message_info()
void vrna_message_verror ( const char* format, va_list args )
This function is a wrapper to vfprintf (stderr, …) that puts a capital ERROR: in front of the message and then exits the calling program.
Parameters:
format | The error message to be printed |
args | The argument list for the formatted message string |
See also:
vrna_message_error() , vrna_message_warning() , vrna_message_info()
void vrna_message_warning ( const char* format, ... )
This function is a wrapper to fprintf (stderr, …) that puts a capital WARNING: in front of the message.
Parameters:
format | The warning message to be printed |
… | Optional arguments for the formatted message string |
See also:
vrna_message_vwarning() , vrna_message_error() , vrna_message_info()
void vrna_message_vwarning ( const char* format, va_list args )
This function is a wrapper to fprintf (stderr, …) that puts a capital WARNING: in front of the message.
Parameters:
format | The warning message to be printed |
args | The argument list for the formatted message string |
See also:
vrna_message_vwarning() , vrna_message_error() , vrna_message_info()
void vrna_message_info ( FILE* fp, const char* format, ... )
This function is a wrapper to fprintf (…).
Parameters:
fp | The file pointer where the message is printed to |
format | The warning message to be printed |
… | Optional arguments for the formatted message string |
See also:
vrna_message_vinfo() , vrna_message_error() , vrna_message_warning()
void vrna_message_vinfo ( FILE* fp, const char* format, va_list args )
This function is a wrapper to fprintf (…).
Parameters:
fp | The file pointer where the message is printed to |
format | The info message to be printed |
args | The argument list for the formatted message string |
See also:
vrna_message_vinfo() , vrna_message_error() , vrna_message_warning()
void vrna_init_rand (void)
double vrna_urn (void)
Returns:
A random number in range [0..1]
Note
Usually implemented by calling erand48() .
See also:
int vrna_int_urn ( int from, int to )
Parameters:
from | The first number in range |
to | The last number in range |
Returns:
A pseudo random number in range [from, to]
See also:
char* vrna_time_stamp (void)
Returns a string containing the current date in the format
Fri Mar 19 21:10:57 1993
Returns:
A string containing the timestamp
unsigned int get_input_line ( char** string, unsigned int options )
Retrieve a line from ‘stdin’ savely while skipping comment characters and other features This function returns the type of input it has read if recognized. An option argument allows one to switch between different reading modes.
Currently available options are:
#VRNA_INPUT_NOPRINT_COMMENTS, VRNA_INPUT_NOSKIP_COMMENTS , #VRNA_INPUT_NOELIM_WS_SUFFIX
pass a collection of options as one value like this:
get_input_line(string, option_1 | option_2 | option_n)
If the function recognizes the type of input, it will report it in the return value. It also reports if a user defined ‘quit’ command (-sign on ‘stdin’) was given. Possible return values are:
VRNA_INPUT_FASTA_HEADER , VRNA_INPUT_ERROR , VRNA_INPUT_MISC , VRNA_INPUT_QUIT
Parameters:
string | A pointer to the character array that contains the line read |
options | A collection of options for switching the functions behavior |
Returns:
A flag with information about what has been read
void vrna_message_input_seq_simple (void)
void vrna_message_input_seq (const char* s)
(usually this is used to ask for user input) There will also be a ruler (scale line) printed that helps orientation of the sequence positions
Parameters:
s | A user defined string that will be printed to stdout |
int* vrna_idx_row_wise (unsigned int length)
Access of a position “(i,j)” is then accomplished by using
(i,j) ~ iindx[i]-j
This function is necessary as most of the two-dimensional energy matrices are actually one-dimensional arrays throughout the ViennaRNA Package
Consult the implemented code to find out about the mapping formula ;)
Parameters:
length | The length of the RNA sequence |
Returns:
The mapper array
See also:
int* vrna_idx_col_wise (unsigned int length)
Access of a position “(i,j)” is then accomplished by using
(i,j) ~ indx[j]+i
This function is necessary as most of the two-dimensional energy matrices are actually one-dimensional arrays throughout the ViennaRNAPackage
Consult the implemented code to find out about the mapping formula ;)
Parameters:
length | The length of the RNA sequence |
Returns:
The mapper array
See also:
#define MAX2( \ A, \ B \ )
#define MAX3( \ A, \ B, \ C \ )
#define MIN2( \ A, \ B \ )
#define MIN3( \ A, \ B, \ C \ )
#define VRNA_INPUT_BLANK_LINE
#define VRNA_INPUT_COMMENT
#define VRNA_INPUT_CONSTRAINT
Input flag for get_input_line() :
Tell get_input_line() that we assume to read a structure constraint.
#define VRNA_INPUT_ERROR
#define VRNA_INPUT_FASTA_HEADER
Input/Output flag of get_input_line() :
if used as input option this tells get_input_line() that the data to be read should comply with the FASTA format.
#define VRNA_INPUT_MISC
#define VRNA_INPUT_NOSKIP_BLANK_LINES
#define VRNA_INPUT_NOSKIP_COMMENTS
#define VRNA_INPUT_NO_REST
#define VRNA_INPUT_NO_SPAN
#define VRNA_INPUT_NO_TRUNCATION
#define VRNA_INPUT_QUIT