-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathW_final.h
123 lines (83 loc) · 3.94 KB
/
W_final.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#ifndef W_FINAL_H_
#define W_FINAL_H_
#include <vector>
#include "VM_final.h"
#include "V_final.h"
#include "pseudo_loop.h"
#include "s_min_folding.h"
#include "h_common.h"
class W_final: public s_min_folding{
public:
W_final(char *seq, char *res);
// constructor for the restricted mfe case
W_final(char *seq, char *res, std::vector<energy_model> *energy_models);
~W_final ();
// The destructor
double hfold ();
// PRE: the init_data function has been called;
// the space for structure has been allocate
// POST: fold sequence, return the MFE structure in structure, and return the MFE
double hfold_emodel ();
// PRE: the init_data function has been called;
// the space for structure has been allocate
// POST: fold sequence, return the MFE structure in structure, and return the MFE
double hfold_pkonly ();
// PRE: the init_data function has been called;
// the space for structure has been allocate
// POST: fold sequence, return the MFE structure in structure, and return the MFE
double hfold_pkonly_emodel ();
// PRE: the init_data function has been called;
// the space for structure has been allocate
// POST: fold sequence, return the MFE structure in structure, and return the MFE
void return_structure (char *structure) ;
// writes the predicted MFE structure into structure
//kevin
double call_simfold_emodel();
protected:
// Hosna: June 18th, 2007:
// this pointer is the main part of the Hierarchical fold program
// and corresponds to WMB recurrence
pseudo_loop *WMB;
// pointer to the final V matrix
V_final *v;
// pointer to the final VM matrix
VM_final *vm;
void space_allocation();
// allocate the necessary memory
double fold_sequence_restricted ();
void backtrack_restricted (seq_interval *cur_interval, str_features *fres);
// backtrack, the restricted case
void backtrack_restricted_emodel (seq_interval *cur_interval, str_features *fres);
// Ian and Kevin
// for call_simfold_emodel
void backtrack_restricted_simfold_emodel (seq_interval *cur_interval, str_features *fres);
void backtrack_restricted_pkonly_emodel (seq_interval *cur_interval, str_features *fres);
void backtrack_restricted_pkonly (seq_interval *cur_interval, str_features *fres);
// backtrack, the restricted case with pk only base pairs
void compute_W_restricted (int j, str_features *fres);
// fill the W array, the restricted case
void compute_W_restricted_emodel (int j, str_features *fres);
// Ian and Kevin
// for call_simfold_emodel
void compute_W_restricted_simfold_emodel (int j, str_features *fres);
void compute_W_restricted_pkonly_emodel (int j, str_features *fres);
// Hosna, April 3, 2012
void compute_W_restricted_pkonly (int j, str_features *fres);
// fill the W array, with addition of just pseudoknotted base pairs to the original structure
int compute_W_br2_restricted (int j, str_features *fres, int &must_choose_this_branch);
int compute_W_br2_restricted_emodel (int j, str_features *fres, int &must_choose_this_branch);
//kevin
int compute_W_br2_restricted_simfold_emodel (int j, str_features *fres, int &must_choose_this_branch);
int compute_W_br2_restricted_pkonly_emodel (int j, str_features *fres, int &must_choose_this_branch);
// Hosna, April 3, 2012
int compute_W_br2_restricted_pkonly (int j, str_features *fres, int &must_choose_this_branch);
int compute_W_br3_restricted (int j, str_features *fres);
void print_result();
// PRE: The matrix V has been calculated and the results written in f
// POST: Prints details of each elementary structure
//s_min_folding *s_w;
//int seq_length;
//int *intseq;
// int *index;
};
#endif /*W_FINAL_H_*/