15 #include "../App/PhylogeneticsApplicationTools.h"
16 #include "../Model/MultinomialFromTransitionModel.h"
17 #include "../Model/TransitionFromTransitionModel.h"
38 shared_ptr<const Alphabet> alphabet,
39 const string& modelDescription,
40 const std::map<
size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
44 unparsedArguments_.clear();
45 unique_ptr<BranchModelInterface> model;
46 string modelName =
"";
47 map<string, string> args;
52 if (args.find(
"data") != args.end())
53 nData = TextTools::to<size_t>(args[
"data"]);
60 if (modelName ==
"Multinomial")
63 if (args.find(
"model") == args.end())
64 throw Exception(
"BppOBranchModelFormat::read. Missing argument 'model' for model " + modelName);
65 string nestedModelDescription = args[
"model"];
70 std::shared_ptr<TransitionModelInterface> nestedModel = nestedReader.
readTransitionModel(alphabet, nestedModelDescription, mData, nData,
false);
77 model = readTransitionModel(alphabet, modelDescription, mData, nData, parseArguments);
83 updateParameters_(*model, args);
88 initialize_(*model, mData.at(nData));
90 initialize_(*model, 0);
From a model, compute the likelihood of counts given an ancestral state.
std::string toString(T t)
Defines the basic types of data flow nodes.