RNAlib-2.2.9

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

string_utils.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_STRING_UTILS_H
2 #define VIENNA_RNA_PACKAGE_STRING_UTILS_H
3
4 /* make this interface backward compatible with RNAlib < 2.2.0 */
5 #define VRNA_BACKWARD_COMPAT
6
7 #ifdef DEPRECATION_WARNINGS
8 # ifdef __GNUC__
9 # define DEPRECATED(func) func __attribute__ ((deprecated))
10 # else
11 # define DEPRECATED(func) func
12 # endif
13 #else
14 # define DEPRECATED(func) func
15 #endif
16
25 #include <ViennaRNA/data_structures.h>
26
30 #define XSTR(s) STR(s)
31
35 #define STR(s) #s
36
37 #ifndef FILENAME_MAX_LENGTH
38
45 #define FILENAME_MAX_LENGTH 80
46
53 #define FILENAME_ID_LENGTH 42
54
55 #endif
56
57 #ifdef HAVE_CONFIG_H
58 #include <config.h>
59 #ifndef HAVE_STRDUP
60 char *strdup(const char *s);
61 #endif
62 #endif
63
71 char *vrna_random_string(int l, const char symbols[]);
72
80 int vrna_hamming_distance(const char *s1, const char *s2);
81
92 int vrna_hamming_distance_bound(const char *s1, const char *s2, int n);
93
101 void vrna_seq_toRNA(char *sequence);
102
108 void vrna_seq_toupper(char *sequence);
109
121 char *vrna_cut_point_insert(const char *string,
122 int cp);
123
136 char *vrna_cut_point_remove(const char *string,
137 int *cp);
138
143 #ifdef VRNA_BACKWARD_COMPAT
144
149 DEPRECATED(void str_uppercase(char *sequence));
150
156 DEPRECATED(void str_DNA2RNA(char *sequence));
157
163 DEPRECATED(char *random_string(int l, const char symbols[]));
164
170 DEPRECATED(int hamming(const char *s1, const char *s2));
171
177 DEPRECATED(int hamming_bound(const char *s1, const char *s2, int n));
178
179 #endif
180
181 #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 &#39;&&#39; 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 &#39;&&#39; 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.