// $Id: distances.cpp 674 2006-04-09 17:06:42Z ninio $ #include "tree.h" #include "sequenceContainer.h" #include "mainSemphy.h" #include "njGamma.h" #include "logFile.h" #include "treeUtil.h" #include "likeDist.h" #include "someUtil.h" #include "codon.h" #include "recognizeFormat.h" #include "pDistance.h" #include "jcDistance.h" #include "likeDist.h" #include #include using namespace std; int main(int argc,char* argv[]) { if (argc < 2) errorMsg::reportError("The program must get some parameters in the command line, use -h for help"); semphy_args_info args_info; if (semphy_cmdline_parser(argc, argv, &args_info) != 0) { errorMsg::reportError("error reading command line",1); } if (args_info.inputs_num<1) errorMsg::reportError("Need a file with an extra pair of sequances",1); // check that we have all we need: if (!args_info.tree_given) { errorMsg::reportError("Must enter input tree",1); } if (!args_info.alpha_given) { errorMsg::reportError("Must set gamma",1); } mainSemphy ms(args_info); // see that we actually got gamma assert(ms.getStochasticProcess().categories() >1); for (int i=0;i> tmp; if (seqlist.eof()) break; string seqid(tmp); ms.out() << seqid <<"\t"; seqlist >> tmp; string sequenceFileName(tmp); ms.out() << sequenceFileName<<"\t"; ifstream ins; ins.open(sequenceFileName.c_str()); if (! ins.good()) errorMsg::reportError("can not open sequence pair file"); sc = recognizeFormat::read(ins,alphP); ins.close(); jcDistance jcD(args_info.alphabet_arg); ms.out() <<""<