string_utils.h
Go to the documentation of this file.
#ifndef VIENNA_RNA_PACKAGE_STRING_UTILS_H
#define VIENNA_RNA_PACKAGE_STRING_UTILS_H
/* make this interface backward compatible with RNAlib < 2.2.0 */
#define VRNA_BACKWARD_COMPAT
#ifdef DEPRECATION_WARNINGS
# ifdef __GNUC__
# define DEPRECATED(func) func __attribute__ ((deprecated))
# else
# define DEPRECATED(func) func
# endif
#else
# define DEPRECATED(func) func
#endif
#include <ViennaRNA/data_structures.h>
#define XSTR(s) STR(s)
#define STR(s) #s
#ifndef FILENAME_MAX_LENGTH
#define FILENAME_MAX_LENGTH 80
#define FILENAME_ID_LENGTH 42
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#ifndef HAVE_STRDUP
char *strdup(const char *s);
#endif
#endif
char *vrna_random_string(int l, const char symbols[]);
int vrna_hamming_distance(const char *s1, const char *s2);
int vrna_hamming_distance_bound(const char *s1, const char *s2, int n);
void vrna_seq_toRNA(char *sequence);
void vrna_seq_toupper(char *sequence);
char *vrna_cut_point_insert(const char *string,
int cp);
char *vrna_cut_point_remove(const char *string,
int *cp);
#ifdef VRNA_BACKWARD_COMPAT
DEPRECATED(void str_uppercase(char *sequence));
DEPRECATED(void str_DNA2RNA(char *sequence));
DEPRECATED(char *random_string(int l, const char symbols[]));
DEPRECATED(int hamming(const char *s1, const char *s2));
DEPRECATED(int hamming_bound(const char *s1, const char *s2, int n));
#endif
#endif
str_uppercase
void str_uppercase(char *sequence)
Convert an input sequence to uppercase.
vrna_hamming_distance
int vrna_hamming_distance(const char *s1, const char *s2)
Calculate hamming distance between two sequences.
vrna_hamming_distance_bound
int vrna_hamming_distance_bound(const char *s1, const char *s2, int n)
Calculate hamming distance between two sequences up to a specified length.
vrna_random_string
char * vrna_random_string(int l, const char symbols[])
Create a random string using characters from a specified symbol set.
data_structures.h
vrna_seq_toRNA
void vrna_seq_toRNA(char *sequence)
Convert an input sequence (possibly containing DNA alphabet characters) to RNA alphabet.
vrna_cut_point_insert
char * vrna_cut_point_insert(const char *string, int cp)
Add a separating '&' character into a string according to cut-point position.
str_DNA2RNA
void str_DNA2RNA(char *sequence)
Convert a DNA input sequence to RNA alphabet.
vrna_cut_point_remove
char * vrna_cut_point_remove(const char *string, int *cp)
Remove a separating '&' character from a string.
hamming
int hamming(const char *s1, const char *s2)
Calculate hamming distance between two sequences.
random_string
char * random_string(int l, const char symbols[])
Create a random string using characters from a specified symbol set.
vrna_seq_toupper
void vrna_seq_toupper(char *sequence)
Convert an input sequence to uppercase.
hamming_bound
int hamming_bound(const char *s1, const char *s2, int n)
Calculate hamming distance between two sequences up to a specified length.