Skip to content

Commit 2e9862a

Browse files
committed
changes for --rnafold option
1 parent 43b8ec5 commit 2e9862a

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

gtfold-mfe/include/loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "constants.h"
2626
#include "data.h"
2727

28-
void readThermodynamicParameters(const char *userdatadir,bool userdatalogic, int unamode,int t_mismatch);
28+
void readThermodynamicParameters(const char *userdatadir,bool userdatalogic, int unamode, int rnamode, int t_mismatch);
2929

3030
int initStackValues(const std::string& fileName, const std::string& dirPath);
3131
int initMiscloopValues(const std::string& fileName, const std::string& dirPath);

gtfold-mfe/include/options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ extern bool SHAPE_ENABLED;
2121
extern bool PARAM_DIR;
2222
extern bool T_MISMATCH;
2323
extern bool UNAMODE;
24+
extern bool RNAMODE;
2425

2526
extern string seqfile;
2627
extern string constraintsFile;

gtfold-mfe/src/loader.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,20 @@ int init;
8080
int gail; /* It is either 0 or 1. It is used for grosely asymmetric internal loops */
8181
float prelog;
8282

83-
void readThermodynamicParameters(const char *userdatadir,bool userdatalogic, int unamode = 0, int mismatch = 0) {
83+
void readThermodynamicParameters(const char *userdatadir,bool userdatalogic,
84+
int unamode = 0, int rnamode = 0, int mismatch = 0) {
8485

8586
if (!userdatalogic && unamode) {
8687
EN_DATADIR.assign(xstr(DATADIR));
8788
EN_DATADIR += "/";
8889
EN_DATADIR += "UNAParams";
90+
printf("readThermodynamicParameters() %d %s\n",unamode, EN_DATADIR.c_str());
91+
}else if (!userdatalogic && rnamode) {
92+
EN_DATADIR.assign(xstr(DATADIR));
93+
EN_DATADIR += "/";
94+
EN_DATADIR += "RNAParams";
8995
}
90-
else if (!userdatalogic) {
96+
else if (!userdatalogic) {
9197
EN_DATADIR.assign(xstr(DATADIR));
9298
EN_DATADIR += "/";
9399
EN_DATADIR += "Turner99";

gtfold-mfe/src/main.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,11 @@ int main(int argc, char** argv) {
226226
exit(-1);
227227
}
228228

229+
printRunConfiguration(seq);
230+
229231
// Read in thermodynamic parameters. Always use Turner99 data (for now)
230-
readThermodynamicParameters(paramDir.c_str(), PARAM_DIR, UNAMODE, T_MISMATCH);
232+
readThermodynamicParameters(paramDir.c_str(), PARAM_DIR, UNAMODE, RNAMODE, T_MISMATCH);
231233

232-
printRunConfiguration(seq);
233234

234235
init_fold(seq);
235236

gtfold-mfe/src/options.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ bool VERBOSE = false;
1616
bool SHAPE_ENABLED = false;
1717
bool T_MISMATCH = false;
1818
bool UNAMODE = false;
19+
bool RNAMODE = false;
1920
bool b_prefilter = false;
2021

2122
string seqfile = "";
@@ -127,6 +128,8 @@ void parse_options(int argc, char** argv) {
127128
T_MISMATCH = true;
128129
} else if (strcmp(argv[i], "--unamode") == 0) {
129130
UNAMODE = true;
131+
} else if (strcmp(argv[i], "--rnafold") == 0) {
132+
RNAMODE = true;
130133
} else if (strcmp(argv[i], "--prefilter") == 0) {
131134
if(i < argc) {
132135
int value1 = -1, value2 = -1;

0 commit comments

Comments
 (0)