1#ifndef VIENNA_RNA_PACKAGE_PAIR_MAT_H
2#define VIENNA_RNA_PACKAGE_PAIR_MAT_H
19static const char Law_and_Order[] =
"_ACGUTXKI";
20static int BP_pair[NBASES][NBASES] =
22{ { 0, 0, 0, 0, 0, 0, 0, 0 },
23 { 0, 0, 0, 0, 5, 0, 0, 5 },
24 { 0, 0, 0, 1, 0, 0, 0, 0 },
25 { 0, 0, 2, 0, 3, 0, 0, 0 },
26 { 0, 6, 0, 4, 0, 0, 0, 6 },
27 { 0, 0, 0, 0, 0, 0, 2, 0 },
28 { 0, 0, 0, 0, 0, 1, 0, 0 },
29 { 0, 6, 0, 0, 5, 0, 0, 0 } };
36static int rtype[8] = {
37 0, 2, 1, 4, 3, 6, 5, 7
41#pragma omp threadprivate(Law_and_Order, BP_pair, alias, pair, rtype)
45#define ENCODE(c) encode_char(c)
56 code = (int)(c -
'A') + 1;
59 pos = strchr(Law_and_Order, c);
63 code = (int)(pos - Law_and_Order);
86 for (i = 0; i < 5; i++)
91 for (i = 0; i < NBASES; i++)
92 for (j = 0; j < NBASES; j++)
93 pair[i][j] = BP_pair[i][j];
95 pair[3][4] = pair[4][3] = 0;
104 for (i = 0; i < NBASES; i++)
105 for (j = 0; j < NBASES; j++)
106 rtype[pair[i][j]] = pair[j][i];
138 for (i = 1; i <
MAXALPHA - 2; i++) {
153 rtype[pair[i][j]] = pair[j][i];
159encode_sequence(
const char *sequence,
162 unsigned int i, l = (
unsigned int)strlen(sequence);
163 short *S = (
short *)
vrna_alloc(
sizeof(
short) * (l + 2));
168 for (i = 1; i <= l; i++)
169 S[i] = (
short)encode_char(sequence[i - 1]);
175 for (i = 1; i <= l; i++)
176 S[i] = alias[(
short)encode_char(sequence[i - 1])];
Here all all declarations of the global variables used throughout RNAlib.
void vrna_message_error(const char *format,...)
Print an error message and die.
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:166
char * nonstandards
contains allowed non standard base pairs
int noGU
Global switch to forbid/allow GU base pairs at all.
int energy_set
0 = BP; 1=any with GC; 2=any with AU-parameter
void * vrna_alloc(unsigned size)
Allocate space safely.
General utility- and helper-functions used throughout the ViennaRNA Package.