diff --git a/bin/lsd2_mac b/bin/lsd2_mac index b89f38e..71edc8f 100755 Binary files a/bin/lsd2_mac and b/bin/lsd2_mac differ diff --git a/src/lsd.cpp b/src/lsd.cpp index 9ab487d..17bb418 100644 --- a/src/lsd.cpp +++ b/src/lsd.cpp @@ -143,7 +143,9 @@ int lsd::buildTimeTree( int argc, char** argv, InputOutputStream *inputOutput) opt->givenRate[0] = false; } } - if (opt->estimate_root=="" || opt->estimate_root=="k") constraintConsistent = initConstraint(opt, nodes); + if (opt->estimate_root=="" || opt->estimate_root=="k"){ + constraintConsistent = initConstraint(opt, nodes); + } if (opt->e>0) calculateOutliers(opt,nodes,median_rate,true); if (opt->splitExternal) splitExternalBranches(opt,nodes); if (!opt->constraint){//LD without constraints @@ -159,7 +161,6 @@ int lsd::buildTimeTree( int argc, char** argv, InputOutputStream *inputOutput) } else if (opt->estimate_root=="k"){ cout<<"Estimating the root position on the branch defined by given outgroups ..."<::iterator iter=nodes[0]->suc.begin(); int s1=(*iter); iter++; @@ -218,9 +219,9 @@ int lsd::buildTimeTree( int argc, char** argv, InputOutputStream *inputOutput) } } else if (opt->estimate_root=="k"){ + if (constraintConsistent){ cout<<"Estimating the root position on the branch defined by given outgroups ..."<::iterator iter=nodes[0]->suc.begin(); int s1=(*iter); iter++; diff --git a/src/options.cpp b/src/options.cpp index 5849b72..af83d41 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -25,7 +25,7 @@ Pr* getOptions( int argc, char** argv ) Pr* getCommandLine( int argc, char** argv) { - const string VERSION="v.1.9.6"; + const string VERSION="v.1.9.7"; Pr* opt = new Pr(); int c; string s; @@ -124,8 +124,8 @@ Pr* getCommandLine( int argc, char** argv) if( !isReal(optarg) ) myExit("Argument of option -b must be a real.\n"); opt->c = atof( optarg ); - if (opt->c<=0 || opt->c>1) - myExit("Argument of option -b must be a positive number samller than 1, see the help\n page of lsd2 -h for more information.\n"); + if (opt->c<=0) + myExit("Argument of option -b must be a positive number, see the help\n page for more information.\n"); break; case 'e': if( !isReal(optarg) ) @@ -356,7 +356,7 @@ Pr* getInterface() void printInterface(ostream& in, Pr* opt) { - const string VERSION = "v.1.9.6"; + const string VERSION = "v.1.9.7"; in<<"\nLEAST-SQUARE METHODS TO ESTIMATE RATES AND DATES - "<