Louis BECQUEY

solved wrong function selection

...@@ -60,7 +60,7 @@ int main(int argc, char* argv[]) ...@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
60 string inputName, outputName, motifs_path_name, basename; 60 string inputName, outputName, motifs_path_name, basename;
61 bool verbose = false; 61 bool verbose = false;
62 float theta_p_threshold; 62 float theta_p_threshold;
63 - int obj_function_nbr, mychar; 63 + char obj_function_nbr;
64 char mea_or_mfe = 'b'; // a for MFE, b for MEA 64 char mea_or_mfe = 'b'; // a for MFE, b for MEA
65 list<Fasta> f; 65 list<Fasta> f;
66 ofstream outfile; 66 ofstream outfile;
...@@ -83,9 +83,8 @@ int main(int argc, char* argv[]) ...@@ -83,9 +83,8 @@ int main(int argc, char* argv[])
83 ("first-objective,c", po::value<unsigned int>(&MOIP::obj_to_solve_)->default_value(2), "Objective to solve in the mono-objective portions of the algorithm") 83 ("first-objective,c", po::value<unsigned int>(&MOIP::obj_to_solve_)->default_value(2), "Objective to solve in the mono-objective portions of the algorithm")
84 ("output,o", po::value<string>(&outputName), "A file to summarize the computation results") 84 ("output,o", po::value<string>(&outputName), "A file to summarize the computation results")
85 ("theta,t", po::value<float>(&theta_p_threshold)->default_value(1e-3, "0.001"), "Pairing probability threshold to consider or not the possibility of pairing") 85 ("theta,t", po::value<float>(&theta_p_threshold)->default_value(1e-3, "0.001"), "Pairing probability threshold to consider or not the possibility of pairing")
86 - ("function,f", po::value<int>(&obj_function_nbr)->default_value('B'), "What objective function to use to include motifs: square of motif size in nucleotides like " 86 + ("function,f", po::value<char>(&obj_function_nbr)->default_value('B'), "What objective function to use to include motifs: square of motif size in nucleotides like "
87 "RNA-MoIP (A), light motif size + high number of components (B), site score (C), light motif size + site score + high number of components (D)") 87 "RNA-MoIP (A), light motif size + high number of components (B), site score (C), light motif size + site score + high number of components (D)")
88 - ("plop,p", po::value<int>(&mychar), "Just a test")
89 88
90 ("mfe,E", "Minimize stacking energies as second criteria (should lead to MFE structure)") 89 ("mfe,E", "Minimize stacking energies as second criteria (should lead to MFE structure)")
91 ("mea,A", "(default) Maximize expected accuracy as second criteria (should lead to MEA structure)") 90 ("mea,A", "(default) Maximize expected accuracy as second criteria (should lead to MEA structure)")
...@@ -99,6 +98,7 @@ int main(int argc, char* argv[]) ...@@ -99,6 +98,7 @@ int main(int argc, char* argv[])
99 98
100 try { 99 try {
101 po::store(po::parse_command_line(argc, argv, desc), vm); // can throw 100 po::store(po::parse_command_line(argc, argv, desc), vm); // can throw
101 + po::notify(vm);
102 102
103 if (vm.count("help") or vm.count("-h")) { 103 if (vm.count("help") or vm.count("-h")) {
104 cout << "Biorseo, bio-objective integer linear programming framework to predict RNA secondary " 104 cout << "Biorseo, bio-objective integer linear programming framework to predict RNA secondary "
...@@ -132,8 +132,6 @@ int main(int argc, char* argv[]) ...@@ -132,8 +132,6 @@ int main(int argc, char* argv[])
132 "--help for more information." 132 "--help for more information."
133 << endl; 133 << endl;
134 return EXIT_FAILURE; 134 return EXIT_FAILURE;
135 - } else {
136 - cout << "char: " << char(obj_function_nbr) << " defaulted: " << vm["function"].defaulted() << " plop: " << vm.count("plop") << " " << char(mychar) << endl;
137 } 135 }
138 136
139 po::notify(vm); // throws on error, so do after help in case there are any problems 137 po::notify(vm); // throws on error, so do after help in case there are any problems
...@@ -182,8 +180,6 @@ int main(int argc, char* argv[]) ...@@ -182,8 +180,6 @@ int main(int argc, char* argv[])
182 else 180 else
183 cerr << "ERR: no source of modules provided !" << endl; 181 cerr << "ERR: no source of modules provided !" << endl;
184 182
185 - return 0;
186 -
187 MOIP myMOIP = MOIP(myRNA, source, motifs_path_name.c_str(), theta_p_threshold, verbose); 183 MOIP myMOIP = MOIP(myRNA, source, motifs_path_name.c_str(), theta_p_threshold, verbose);
188 double min, max; 184 double min, max;
189 IloConstraintArray F(myMOIP.get_env()); 185 IloConstraintArray F(myMOIP.get_env());
......