bpp-phyl3 3.0.0
PhylogeneticsApplicationTools.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
5#ifndef BPP_PHYL_APP_PHYLOGENETICSAPPLICATIONTOOLS_H
6#define BPP_PHYL_APP_PHYLOGENETICSAPPLICATIONTOOLS_H
7
8#include "../Likelihood/ModelScenario.h"
9#include "../Likelihood/PhyloLikelihoods/PhyloLikelihoodContainer.h"
10#include "../Likelihood/PhyloLikelihoods/AlignedPhyloLikelihoodSet.h"
11#include "../Likelihood/PhyloLikelihoods/SingleDataPhyloLikelihood.h"
12#include "../Likelihood/SequenceEvolution.h"
13#include "../Likelihood/AutonomousSubstitutionProcess.h"
14#include "../Likelihood/SubstitutionProcessCollection.h"
15#include "../Likelihood/SubstitutionProcessCollectionMember.h"
16#include "../Mapping/SubstitutionCount.h"
17#include "../Model/MarkovModulatedSubstitutionModel.h"
18#include "../Model/SubstitutionModel.h"
19#include "../Tree/PhyloTree.h"
20#include "../Likelihood/DataFlow/DataFlow.h"
21
22// From bpp-core:
23#include <Bpp/Io/OutputStream.h>
27#include <Bpp/Text/TextTools.h>
28
29// From bpp-seq:
34
35// From the STL:
36#include <string>
37#include <map>
38#include <memory>
39#include <vector>
40
41namespace bpp
42{
58{
59public:
62
63
78 static std::unique_ptr<Tree> getTree(
79 const std::map<std::string, std::string>& params,
80 const std::string& prefix = "input.",
81 const std::string& suffix = "",
82 bool suffixIsOptional = true,
83 bool verbose = true,
84 int warn = 1);
85
100 static std::vector<std::unique_ptr<Tree>> getTrees(
101 const std::map<std::string, std::string>& params,
102 const std::string& prefix = "input.",
103 const std::string& suffix = "",
104 bool suffixIsOptional = true,
105 bool verbose = true,
106 int warn = 1);
107
127 static std::map<size_t, std::shared_ptr<PhyloTree>> getPhyloTrees(
128 const std::map<std::string, std::string>& params,
129 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mSeq,
130 std::map<std::string, std::string>& unparsedParams,
131 const std::string& prefix = "input.",
132 const std::string& suffix = "",
133 bool suffixIsOptional = true,
134 bool verbose = true,
135 int warn = 1);
136
167 static std::unique_ptr<BranchModelInterface> getBranchModel(
168 std::shared_ptr<const Alphabet> alphabet,
169 std::shared_ptr<const GeneticCode> gCode,
170 std::shared_ptr<const AlignmentDataInterface> data,
171 const std::map<std::string, std::string>& params,
172 std::map<std::string, std::string>& unparsedparams,
173 const std::string& suffix = "",
174 bool suffixIsOptional = true,
175 bool verbose = true,
176 int warn = 1);
177
207 static std::unique_ptr<SubstitutionModelInterface> getSubstitutionModel(
208 std::shared_ptr<const Alphabet> alphabet,
209 std::shared_ptr<const GeneticCode> gCode,
210 std::shared_ptr<const AlignmentDataInterface> data,
211 const std::map<std::string, std::string>& params,
212 std::map<std::string, std::string>& unparsedparams,
213 const std::string& suffix = "",
214 bool suffixIsOptional = true,
215 bool verbose = true,
216 int warn = 1);
217
218
222 static std::map<size_t, std::unique_ptr<BranchModelInterface>> getBranchModels(
223 std::shared_ptr<const Alphabet> alphabet,
224 std::shared_ptr<const GeneticCode> gCode,
225 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
226 const std::map<std::string, std::string>& params,
227 std::map<std::string, std::string>& unparsedparams,
228 const std::string& suffix = "",
229 bool suffixIsOptional = true,
230 bool verbose = true,
231 int warn = 1);
232
258 static std::unique_ptr<FrequencySetInterface> getRootFrequencySet(
259 std::shared_ptr<const Alphabet> alphabet,
260 std::shared_ptr<const GeneticCode> gCode,
261 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
262 size_t nData,
263 const std::map<std::string, std::string>& params,
264 std::map<std::string, std::string>& sharedparams,
265 const std::vector<double>& rateFreqs,
266 const std::string& suffix = "",
267 bool suffixIsOptional = true,
268 bool verbose = true,
269 int warn = 1);
270
271 static std::unique_ptr<FrequencySetInterface> getRootFrequencySet(
272 std::shared_ptr<const Alphabet> alphabet,
273 std::shared_ptr<const GeneticCode> gCode,
274 std::shared_ptr<const AlignmentDataInterface> data,
275 const std::map<std::string, std::string>& params,
276 std::map<std::string, std::string>& sharedparams,
277 const std::vector<double>& rateFreqs,
278 const std::string& suffix = "",
279 bool suffixIsOptional = true,
280 bool verbose = true,
281 int warn = 1)
282 {
283 std::map<size_t, std::shared_ptr<const AlignmentDataInterface>> mData;
284 mData[1] = data;
285
286 return getRootFrequencySet(alphabet, gCode, mData, 1, params, sharedparams, rateFreqs, suffix, suffixIsOptional, verbose, warn);
287 }
288
292 static std::map<size_t, std::unique_ptr<FrequencySetInterface>> getRootFrequencySets(
293 std::shared_ptr<const Alphabet> alphabet,
294 std::shared_ptr<const GeneticCode> gCode,
295 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
296 const std::map<std::string, std::string>& params,
297 std::map<std::string, std::string>& sharedparams,
298 const std::string& suffix = "",
299 bool suffixIsOptional = true,
300 bool verbose = true,
301 int warn = 1);
302
324 static std::unique_ptr<FrequencySetInterface> getFrequencySet(
325 std::shared_ptr<const Alphabet> alphabet,
326 std::shared_ptr<const GeneticCode> gCode,
327 const std::string& freqDescription,
328 std::shared_ptr<const AlignmentDataInterface> data,
329 std::map<std::string, std::string>& sharedParams,
330 const std::vector<double>& rateFreqs,
331 bool verbose = true,
332 int warn = 1)
333 {
334 std::map<size_t, std::shared_ptr<const AlignmentDataInterface>> mData;
335 mData[1] = data;
336
337 return getFrequencySet(alphabet, gCode, freqDescription, mData, 1, sharedParams, rateFreqs, verbose, warn);
338 }
339
363 static std::unique_ptr<FrequencySetInterface> getFrequencySet(
364 std::shared_ptr<const Alphabet> alphabet,
365 std::shared_ptr<const GeneticCode> gCode,
366 const std::string& freqDescription,
367 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
368 size_t nData,
369 std::map<std::string, std::string>& sharedParams,
370 const std::vector<double>& rateFreqs,
371 bool verbose = true,
372 int warn = 1);
373
394 static map<size_t, std::unique_ptr<ModelPath>> getModelPaths(
395 const std::map<std::string, std::string>& params,
396 const map<size_t, std::shared_ptr<BranchModelInterface>>& mModel,
397 const string& suffix = "",
398 bool suffixIsOptional = true,
399 bool verbose = true,
400 int warn = 1);
401
419 static map<size_t, std::unique_ptr<ModelScenario>> getModelScenarios(
420 const std::map<std::string, std::string>& params,
421 const map<size_t, std::shared_ptr<ModelPath>>& mModelPath,
422 const map<size_t, std::shared_ptr<BranchModelInterface>>& mModel,
423 const string& suffix = "",
424 bool suffixIsOptional = true,
425 bool verbose = true,
426 int warn = 1);
427
442 static std::unique_ptr<SubstitutionRegisterInterface> getSubstitutionRegister(
443 const std::string& regTypeDesc,
444 std::shared_ptr<const StateMapInterface> stateMap,
445 std::shared_ptr<const GeneticCode> genCode,
446 std::shared_ptr<AlphabetIndex2>& weights,
447 std::shared_ptr<AlphabetIndex2>& distances,
448 bool verbose = true);
449
476 static std::unique_ptr<AutonomousSubstitutionProcessInterface> getSubstitutionProcess(
477 std::shared_ptr<const Alphabet> alphabet,
478 std::shared_ptr<const GeneticCode> gCode,
479 std::shared_ptr<const AlignmentDataInterface> data,
480 const vector<std::shared_ptr<PhyloTree>>& vTree,
481 const std::map<std::string, std::string>& params,
482 const std::string& suffix = "",
483 bool suffixIsOptional = true,
484 bool verbose = true,
485 int warn = 1);
486
509 static std::unique_ptr<SubstitutionProcessCollection> getSubstitutionProcessCollection(
510 std::shared_ptr<const Alphabet> alphabet,
511 std::shared_ptr<const GeneticCode> gCode,
512 const map<size_t, std::shared_ptr<PhyloTree>>& mTree,
513 const map<size_t, std::shared_ptr<BranchModelInterface>>& mMod,
514 const map<size_t, std::shared_ptr<FrequencySetInterface>>& mRootFreq,
515 const map<size_t, std::shared_ptr<DiscreteDistributionInterface>>& mDist,
516 const map<size_t, std::shared_ptr<ModelScenario>>& mScen,
517 const std::map<std::string, std::string>& params,
518 map<string, string>& unparsedparams,
519 const string& suffix = "",
520 bool suffixIsOptional = true,
521 bool verbose = true,
522 int warn = 1);
523
524
539 size_t procNum,
540 const std::map<std::string, std::string>& params,
541 bool verbose = true,
542 int warn = 1);
543
544
549 static std::map<size_t, std::unique_ptr<SequenceEvolution>> getSequenceEvolutions(
550 std::shared_ptr<SubstitutionProcessCollection> SPC,
551 const std::map<std::string, std::string>& params,
552 map<string, string>& unparsedParams,
553 const string& suffix = "",
554 bool suffixIsOptional = true,
555 bool verbose = true,
556 int warn = 1);
557
558
567 static std::shared_ptr<PhyloLikelihoodContainer> getPhyloLikelihoodContainer(
568 Context& context,
569 std::shared_ptr<SubstitutionProcessCollection> SPC,
570 std::map<size_t, std::shared_ptr<SequenceEvolution>>& mSeqEvol,
571 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
572 const std::map<std::string, std::string>& params,
573 const string& suffix = "",
574 bool suffixIsOptional = true,
575 bool verbose = true,
576 int warn = 1);
577
593 const std::string& distDescription,
594 std::map<std::string, std::string>& unparsedParameterValues,
595 bool verbose = true);
596
610 static std::unique_ptr<DiscreteDistributionInterface> getRateDistribution(
611 const std::map<std::string, std::string>& params,
612 const std::string& suffix = "",
613 bool suffixIsOptional = true,
614 bool verbose = true);
615
621 static std::map<size_t, std::shared_ptr<DiscreteDistributionInterface>> getRateDistributions(
622 const std::map<std::string, std::string>& params,
623 const string& suffix = "",
624 bool suffixIsOptional = true,
625 bool verbose = true);
626
646 static std::shared_ptr<PhyloLikelihoodInterface> optimizeParameters(
647 std::shared_ptr<PhyloLikelihoodInterface> lik,
648 const std::map<std::string, std::string>& params,
649 const std::string& suffix = "",
650 bool suffixIsOptional = true,
651 bool verbose = true,
652 int warn = 1);
653
662 static void checkEstimatedParameters(const ParameterList& pl);
663
675 static std::unique_ptr<SubstitutionCountInterface> getSubstitutionCount(
676 std::shared_ptr<const Alphabet> alphabet,
677 std::shared_ptr<const SubstitutionModelInterface> model,
678 const std::map<std::string, std::string>& params,
679 string suffix = "",
680 bool verbose = true,
681 int warn = 1);
682
705 static void writeTree(
706 const TreeTemplate<Node>& tree,
707 const std::map<std::string, std::string>& params,
708 const std::string& prefix = "output.",
709 const std::string& suffix = "",
710 bool suffixIsOptional = true,
711 bool verbose = true,
712 bool checkOnly = false,
713 int warn = 1);
714
732 static void writePhyloTrees(
733 const std::vector<const PhyloTree*>& trees,
734 const std::map<std::string, std::string>& params,
735 const std::string& prefix = "output.",
736 const std::string& suffix = "",
737 bool suffixIsOptional = true,
738 bool verbose = true,
739 bool checkOnly = false,
740 int warn = 1);
741
761 static void writePhyloTrees(
763 const std::map<std::string, std::string>& params,
764 const std::string& prefix = "output.",
765 const std::string& suffix = "",
766 bool suffixIsOptional = true,
767 bool verbose = true,
768 bool checkOnly = false,
769 bool withIds = false,
770 int warn = 1);
771
772
781 static void printParameters(const BranchModelInterface& model, OutputStream& out, int warn = 1);
782
790 static void printParameters(const SubstitutionProcessInterface& process, OutputStream& out, int warn = 1);
791
802 static void printParameters(const SubstitutionProcessCollection& collection, OutputStream& out, int warn = 1, bool withAlias = true);
803
816 static void printParameters(const PhyloLikelihoodContainer& phylocont, OutputStream& out, int warn = 1);
817
818
819 static void printParameters(const SingleDataPhyloLikelihoodInterface& phylolike, OutputStream& out, size_t nPhylo = 1, int warn = 1);
820
830 static void printParameters(const SequenceEvolution& evol, OutputStream& out, size_t nEvol = 1, int warn = 1);
831
841 static void printParameters(const DiscreteDistributionInterface& rDist, OutputStream& out, bool withAlias = true);
842
851 static void printAnalysisInformation(const PhyloLikelihoodContainer& phylocont, const std::string& infosFile, int warn = 1);
852
853 static void printAnalysisInformation(const SingleDataPhyloLikelihoodInterface& phylolike, const std::string& infosFile, int warn = 1);
854
855 static void printAnalysisInformation(const AlignedPhyloLikelihoodSetInterface& sOAP, const std::string& infosFile, int warn = 1);
856
860 template<class T>
861 static std::map<size_t, std::shared_ptr<T>> uniqueToSharedMap(std::map<size_t, std::unique_ptr<T>>& mu)
862 {
863 std::map<size_t, std::shared_ptr<T>> ms;
864 for (auto& it : mu)
865 {
866 std::shared_ptr<T> pt = std::move(it.second);
867 ms.emplace(it.first, pt);
868 }
869 return ms;
870 }
871};
872} // end of namespace bpp.
873#endif // BPP_PHYL_APP_PHYLOGENETICSAPPLICATIONTOOLS_H
Joint interface SetOf+Aligned PhylLikelihood.
Interface for all Branch models.
Context for dataflow node construction.
Definition: DataFlow.h:527
The PhyloLikelihoodContainer, owns and assigns numbers to Phylolikelihoods.
This class provides some common tools for applications.
static void printAnalysisInformation(const PhyloLikelihoodContainer &phylocont, const std::string &infosFile, int warn=1)
Output information on the computation to a file.
static std::unique_ptr< BranchModelInterface > getBranchModel(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, std::shared_ptr< const AlignmentDataInterface > data, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &unparsedparams, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a BranchModel (most general class of branch models) object according to options.
static std::map< size_t, std::unique_ptr< SequenceEvolution > > getSequenceEvolutions(std::shared_ptr< SubstitutionProcessCollection > SPC, const std::map< std::string, std::string > &params, map< string, string > &unparsedParams, const string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a map of Sequence Evolution, ie ways how sequence evolve, which may use several processes.
static MultipleDiscreteDistribution * getMultipleDistributionDefaultInstance(const std::string &distDescription, std::map< std::string, std::string > &unparsedParameterValues, bool verbose=true)
Build a multi-dimension distribution as a MultipleDiscreteDistribution object with default parameter ...
static std::map< size_t, std::unique_ptr< FrequencySetInterface > > getRootFrequencySets(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mData, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &sharedparams, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
The same, but returns a map <number, shared_ptr<FrequencySetInterface>>.
static void printParameters(const BranchModelInterface &model, OutputStream &out, int warn=1)
Output a SubstitutionModel description to a file.
static std::unique_ptr< FrequencySetInterface > getRootFrequencySet(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, std::shared_ptr< const AlignmentDataInterface > data, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &sharedparams, const std::vector< double > &rateFreqs, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
static std::shared_ptr< PhyloLikelihoodContainer > getPhyloLikelihoodContainer(Context &context, std::shared_ptr< SubstitutionProcessCollection > SPC, std::map< size_t, std::shared_ptr< SequenceEvolution > > &mSeqEvol, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mData, const std::map< std::string, std::string > &params, const string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a Phylogeny container from parameters map.
static void checkEstimatedParameters(const ParameterList &pl)
Check if parameter values are close to their definition boundary.
static std::map< size_t, std::unique_ptr< BranchModelInterface > > getBranchModels(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mData, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &unparsedparams, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
The same as before, but returns a map <number, branch model>.
static std::map< size_t, std::shared_ptr< T > > uniqueToSharedMap(std::map< size_t, std::unique_ptr< T > > &mu)
static std::unique_ptr< FrequencySetInterface > getFrequencySet(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const std::string &freqDescription, std::shared_ptr< const AlignmentDataInterface > data, std::map< std::string, std::string > &sharedParams, const std::vector< double > &rateFreqs, bool verbose=true, int warn=1)
Get A FrequencySet object according to options.
static std::unique_ptr< SubstitutionCountInterface > getSubstitutionCount(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const SubstitutionModelInterface > model, const std::map< std::string, std::string > &params, string suffix="", bool verbose=true, int warn=1)
Get a SubstitutionCount instance.
static std::vector< std::unique_ptr< Tree > > getTrees(const std::map< std::string, std::string > &params, const std::string &prefix="input.", const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a list of Tree objects according to options.
static std::unique_ptr< FrequencySetInterface > getRootFrequencySet(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mData, size_t nData, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &sharedparams, const std::vector< double > &rateFreqs, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Get A FrequencySet object for root frequencies (NH models) according to options.
static std::unique_ptr< DiscreteDistributionInterface > getRateDistribution(const std::map< std::string, std::string > &params, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true)
Build a DiscreteDistribution object according to options.
static std::unique_ptr< Tree > getTree(const std::map< std::string, std::string > &params, const std::string &prefix="input.", const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a Tree object according to options.
static void writePhyloTrees(const std::vector< const PhyloTree * > &trees, const std::map< std::string, std::string > &params, const std::string &prefix="output.", const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, bool checkOnly=false, int warn=1)
Write a tree according to options.
static map< size_t, std::unique_ptr< ModelScenario > > getModelScenarios(const std::map< std::string, std::string > &params, const map< size_t, std::shared_ptr< ModelPath > > &mModelPath, const map< size_t, std::shared_ptr< BranchModelInterface > > &mModel, const string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build map of ModelScenarios from a map of ModelPaths.
static std::shared_ptr< PhyloLikelihoodInterface > optimizeParameters(std::shared_ptr< PhyloLikelihoodInterface > lik, const std::map< std::string, std::string > &params, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Optimize parameters according to options.
static std::map< size_t, std::shared_ptr< DiscreteDistributionInterface > > getRateDistributions(const std::map< std::string, std::string > &params, const string &suffix="", bool suffixIsOptional=true, bool verbose=true)
static std::unique_ptr< AutonomousSubstitutionProcessInterface > getSubstitutionProcess(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, std::shared_ptr< const AlignmentDataInterface > data, const vector< std::shared_ptr< PhyloTree > > &vTree, const std::map< std::string, std::string > &params, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Sets a SubstitutionProcess object according to options.
static void writeTree(const TreeTemplate< Node > &tree, const std::map< std::string, std::string > &params, const std::string &prefix="output.", const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, bool checkOnly=false, int warn=1)
Output methods:
static std::unique_ptr< SubstitutionModelInterface > getSubstitutionModel(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, std::shared_ptr< const AlignmentDataInterface > data, const std::map< std::string, std::string > &params, std::map< std::string, std::string > &unparsedparams, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a SubstitutionModel object according to options (ie a BranchModel with a generator).
static map< size_t, std::unique_ptr< ModelPath > > getModelPaths(const std::map< std::string, std::string > &params, const map< size_t, std::shared_ptr< BranchModelInterface > > &mModel, const string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build map of ModelPaths from a map of BranchModel.
static std::map< size_t, std::shared_ptr< PhyloTree > > getPhyloTrees(const std::map< std::string, std::string > &params, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mSeq, std::map< std::string, std::string > &unparsedParams, const std::string &prefix="input.", const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Build a map of <number,PhyloTree> according to options.
static std::unique_ptr< SubstitutionRegisterInterface > getSubstitutionRegister(const std::string &regTypeDesc, std::shared_ptr< const StateMapInterface > stateMap, std::shared_ptr< const GeneticCode > genCode, std::shared_ptr< AlphabetIndex2 > &weights, std::shared_ptr< AlphabetIndex2 > &distances, bool verbose=true)
Get a Register instance.
static std::unique_ptr< SubstitutionProcessCollection > getSubstitutionProcessCollection(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const map< size_t, std::shared_ptr< PhyloTree > > &mTree, const map< size_t, std::shared_ptr< BranchModelInterface > > &mMod, const map< size_t, std::shared_ptr< FrequencySetInterface > > &mRootFreq, const map< size_t, std::shared_ptr< DiscreteDistributionInterface > > &mDist, const map< size_t, std::shared_ptr< ModelScenario > > &mScen, const std::map< std::string, std::string > &params, map< string, string > &unparsedparams, const string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1)
Builds a SubstitutionProcessCollection from many maps of relevant objects.
static bool addSubstitutionProcessCollectionMember(SubstitutionProcessCollection &SubProColl, size_t procNum, const std::map< std::string, std::string > &params, bool verbose=true, int warn=1)
Adds a SubstitutionProcessCollectionMember to a Collection, under a given number.
This interface describes the evolution process of a sequence.
The SingleDataPhyloLikelihood interface, for phylogenetic likelihood.
Collection of Substitution Process, which owns all the necessary objects: Substitution models,...
This interface describes the substitution process along the tree and sites of the alignment.
The phylogenetic tree class.
Definition: TreeTemplate.h:59
Defines the basic types of data flow nodes.