New version; synchronize in repository
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1461 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
4c667c0dce
commit
5dc30552dd
4 changed files with 10 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ unsigned int ngenerations, popsize, ncats;
|
||||||
ofstream exp_data,evolution_data, best_media_scores, final_trees, final_pareto_trees, clades_pareto, clades_final,final_scores,pareto_scores;
|
ofstream exp_data,evolution_data, best_media_scores, final_trees, final_pareto_trees, clades_pareto, clades_final,final_scores,pareto_scores;
|
||||||
LikelihoodCalculator *lik_calc_ptr;
|
LikelihoodCalculator *lik_calc_ptr;
|
||||||
phylotreeIND *templatetree_ptr;
|
phylotreeIND *templatetree_ptr;
|
||||||
|
ProbMatrixContainer *probmatrixs_ptr;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
||||||
if( datafile.size()==0 )
|
if( datafile.size()==0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
if(getNodeRank()==1) parser.printHelp( cout );
|
if(getNodeRank()==1) parser.printHelp( cout );
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,6 +88,7 @@ int main(int argc, char *argv[])
|
||||||
modelHKY.init();
|
modelHKY.init();
|
||||||
modelHKY.set_kappa(kappa);
|
modelHKY.set_kappa(kappa);
|
||||||
ProbMatrixContainer probmatrixs(modelHKY);
|
ProbMatrixContainer probmatrixs(modelHKY);
|
||||||
|
probmatrixs_ptr = &probmatrixs;
|
||||||
LikelihoodCalculator lik_calc(templatetree, modelHKY, probmatrixs,ncats);
|
LikelihoodCalculator lik_calc(templatetree, modelHKY, probmatrixs,ncats);
|
||||||
lik_calc.set_alpha(alpha);
|
lik_calc.set_alpha(alpha);
|
||||||
modelHKY.init();
|
modelHKY.init();
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
//#include <peo>
|
//#include <peo>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
extern ProbMatrixContainer *probmatrixs_ptr;
|
||||||
|
|
||||||
class PhyloEval : public moeoEvalFunc < PhyloMOEO >
|
class PhyloEval : public moeoEvalFunc < PhyloMOEO >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -47,6 +49,7 @@ public:
|
||||||
objVec[0] = parseval.fitch();
|
objVec[0] = parseval.fitch();
|
||||||
objVec[1] = -likeval.calculate_likelihood();
|
objVec[1] = -likeval.calculate_likelihood();
|
||||||
_sol.objectiveVector(objVec);
|
_sol.objectiveVector(objVec);
|
||||||
|
probmatrixs_ptr->clear();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1556,6 +1556,7 @@ void phylotreeIND::read_newick2(string newickstring)
|
||||||
if( read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1)
|
if( read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1)
|
||||||
{
|
{
|
||||||
cout << "sintax error in position " << pos << endl;
|
cout << "sintax error in position " << pos << endl;
|
||||||
|
cout << newickstring << endl;
|
||||||
throw ExceptionManager(11);
|
throw ExceptionManager(11);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -1594,6 +1595,7 @@ void phylotreeIND::read_newick2(string newickstring)
|
||||||
if(read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1)
|
if(read_taxonname_bl(newickstring, taxon_name, blen, pos) == -1)
|
||||||
{
|
{
|
||||||
cout << "sintax error at position " << pos << endl;
|
cout << "sintax error at position " << pos << endl;
|
||||||
|
cout << newickstring << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <eo>
|
#include <eo>
|
||||||
#include <moeo>
|
#include <moeo>
|
||||||
|
#include <peo>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <likoptimizer.h>
|
#include <likoptimizer.h>
|
||||||
|
|
@ -88,6 +89,7 @@ void optimize_solutions( eoPop<PhyloMOEO> &pop)
|
||||||
|
|
||||||
void optimize_solution( PhyloMOEO &indi)
|
void optimize_solution( PhyloMOEO &indi)
|
||||||
{
|
{
|
||||||
|
cout << "\noptimizaing tree in node " << getNodeRank() << endl;
|
||||||
phylotreeIND &sol = indi.get_tree();
|
phylotreeIND &sol = indi.get_tree();
|
||||||
lik_calc_ptr->set_tree(sol);
|
lik_calc_ptr->set_tree(sol);
|
||||||
//cout << "\noptimizaing tree " << i+1 << " of " << n;
|
//cout << "\noptimizaing tree " << i+1 << " of " << n;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue