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 
41 namespace bpp
42 {
58 {
59 public:
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 
325  static std::unique_ptr<FrequencySetInterface> getFrequencySet(
326  std::shared_ptr<const Alphabet> alphabet,
327  std::shared_ptr<const GeneticCode> gCode,
328  const std::string& freqDescription,
329  std::shared_ptr<const AlignmentDataInterface> data,
330  std::map<std::string, std::string>& sharedParams,
331  const std::vector<double>& rateFreqs,
332  bool verbose = true,
333  int warn = 1)
334  {
335  std::map<size_t, std::shared_ptr<const AlignmentDataInterface>> mData;
336  mData[1]=data;
337 
338  return getFrequencySet(alphabet, gCode, freqDescription, mData, 1, sharedParams, rateFreqs, verbose, warn);
339  }
340 
364  static std::unique_ptr<FrequencySetInterface> getFrequencySet(
365  std::shared_ptr<const Alphabet> alphabet,
366  std::shared_ptr<const GeneticCode> gCode,
367  const std::string& freqDescription,
368  const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
369  size_t nData,
370  std::map<std::string, std::string>& sharedParams,
371  const std::vector<double>& rateFreqs,
372  bool verbose = true,
373  int warn = 1);
374 
395  static map<size_t, std::unique_ptr<ModelPath>> getModelPaths(
396  const std::map<std::string, std::string>& params,
397  const map<size_t, std::shared_ptr<BranchModelInterface>>& mModel,
398  const string& suffix = "",
399  bool suffixIsOptional = true,
400  bool verbose = true,
401  int warn = 1);
402 
420  static map<size_t, std::unique_ptr<ModelScenario>> getModelScenarios(
421  const std::map<std::string, std::string>& params,
422  const map<size_t, std::shared_ptr<ModelPath>>& mModelPath,
423  const map<size_t, std::shared_ptr<BranchModelInterface>>& mModel,
424  const string& suffix = "",
425  bool suffixIsOptional = true,
426  bool verbose = true,
427  int warn = 1);
428 
443  static std::unique_ptr<SubstitutionRegisterInterface> getSubstitutionRegister(
444  const std::string& regTypeDesc,
445  std::shared_ptr<const StateMapInterface> stateMap,
446  std::shared_ptr<const GeneticCode> genCode,
447  std::shared_ptr<AlphabetIndex2>& weights,
448  std::shared_ptr<AlphabetIndex2>& distances,
449  bool verbose = true);
450 
477  static std::unique_ptr<AutonomousSubstitutionProcessInterface> getSubstitutionProcess(
478  std::shared_ptr<const Alphabet> alphabet,
479  std::shared_ptr<const GeneticCode> gCode,
480  std::shared_ptr<const AlignmentDataInterface> data,
481  const vector<std::shared_ptr<PhyloTree>>& vTree,
482  const std::map<std::string, std::string>& params,
483  const std::string& suffix = "",
484  bool suffixIsOptional = true,
485  bool verbose = true,
486  int warn = 1);
487 
510  static std::unique_ptr<SubstitutionProcessCollection> getSubstitutionProcessCollection(
511  std::shared_ptr<const Alphabet> alphabet,
512  std::shared_ptr<const GeneticCode> gCode,
513  const map<size_t, std::shared_ptr<PhyloTree>>& mTree,
514  const map<size_t, std::shared_ptr<BranchModelInterface>>& mMod,
515  const map<size_t, std::shared_ptr<FrequencySetInterface>>& mRootFreq,
516  const map<size_t, std::shared_ptr<DiscreteDistributionInterface>>& mDist,
517  const map<size_t, std::shared_ptr<ModelScenario>>& mScen,
518  const std::map<std::string, std::string>& params,
519  map<string, string>& unparsedparams,
520  const string& suffix = "",
521  bool suffixIsOptional = true,
522  bool verbose = true,
523  int warn = 1);
524 
525 
539  SubstitutionProcessCollection& SubProColl,
540  size_t procNum,
541  const std::map<std::string, std::string>& params,
542  bool verbose = true,
543  int warn = 1);
544 
545 
550  static std::map<size_t, std::unique_ptr<SequenceEvolution>> getSequenceEvolutions(
551  std::shared_ptr<SubstitutionProcessCollection> SPC,
552  const std::map<std::string, std::string>& params,
553  map<string, string>& unparsedParams,
554  const string& suffix = "",
555  bool suffixIsOptional = true,
556  bool verbose = true,
557  int warn = 1);
558 
559 
568  static std::shared_ptr<PhyloLikelihoodContainer> getPhyloLikelihoodContainer(
569  Context& context,
570  std::shared_ptr<SubstitutionProcessCollection> SPC,
571  std::map<size_t, std::shared_ptr<SequenceEvolution>>& mSeqEvol,
572  const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
573  const std::map<std::string, std::string>& params,
574  const string& suffix = "",
575  bool suffixIsOptional = true,
576  bool verbose = true,
577  int warn = 1);
578 
594  const std::string& distDescription,
595  std::map<std::string, std::string>& unparsedParameterValues,
596  bool verbose = true);
597 
611  static std::unique_ptr<DiscreteDistributionInterface> getRateDistribution(
612  const std::map<std::string, std::string>& params,
613  const std::string& suffix = "",
614  bool suffixIsOptional = true,
615  bool verbose = true);
616 
622  static std::map<size_t, std::shared_ptr<DiscreteDistributionInterface>> getRateDistributions(
623  const std::map<std::string, std::string>& params,
624  const string& suffix = "",
625  bool suffixIsOptional = true,
626  bool verbose = true);
627 
647  static std::shared_ptr<PhyloLikelihoodInterface> optimizeParameters(
648  std::shared_ptr<PhyloLikelihoodInterface> lik,
649  const std::map<std::string, std::string>& params,
650  const std::string& suffix = "",
651  bool suffixIsOptional = true,
652  bool verbose = true,
653  int warn = 1);
654 
663  static void checkEstimatedParameters(const ParameterList& pl);
664 
676  static std::unique_ptr<SubstitutionCountInterface> getSubstitutionCount(
677  std::shared_ptr<const Alphabet> alphabet,
678  std::shared_ptr<const SubstitutionModelInterface> model,
679  const std::map<std::string, std::string>& params,
680  string suffix = "",
681  bool verbose = true,
682  int warn = 1);
683 
706  static void writeTree(
707  const TreeTemplate<Node>& tree,
708  const std::map<std::string, std::string>& params,
709  const std::string& prefix = "output.",
710  const std::string& suffix = "",
711  bool suffixIsOptional = true,
712  bool verbose = true,
713  bool checkOnly = false,
714  int warn = 1);
715 
733  static void writePhyloTrees(
734  const std::vector<const PhyloTree*>& trees,
735  const std::map<std::string, std::string>& params,
736  const std::string& prefix = "output.",
737  const std::string& suffix = "",
738  bool suffixIsOptional = true,
739  bool verbose = true,
740  bool checkOnly = false,
741  int warn = 1);
742 
762  static void writePhyloTrees(
764  const std::map<std::string, std::string>& params,
765  const std::string& prefix = "output.",
766  const std::string& suffix = "",
767  bool suffixIsOptional = true,
768  bool verbose = true,
769  bool checkOnly = false,
770  bool withIds = false,
771  int warn = 1);
772 
773 
782  static void printParameters(const BranchModelInterface& model, OutputStream& out, int warn = 1);
783 
791  static void printParameters(const SubstitutionProcessInterface& process, OutputStream& out, int warn = 1);
792 
803  static void printParameters(const SubstitutionProcessCollection& collection, OutputStream& out, int warn = 1, bool withAlias = true);
804 
817  static void printParameters(const PhyloLikelihoodContainer& phylocont, OutputStream& out, int warn = 1);
818 
819 
820  static void printParameters(const SingleDataPhyloLikelihoodInterface& phylolike, OutputStream& out, size_t nPhylo = 1, int warn = 1);
821 
831  static void printParameters(const SequenceEvolution& evol, OutputStream& out, size_t nEvol = 1, int warn = 1);
832 
842  static void printParameters(const DiscreteDistributionInterface& rDist, OutputStream& out, bool withAlias = true);
843 
852  static void printAnalysisInformation(const PhyloLikelihoodContainer& phylocont, const std::string& infosFile, int warn = 1);
853 
854  static void printAnalysisInformation(const SingleDataPhyloLikelihoodInterface& phylolike, const std::string& infosFile, int warn = 1);
855 
856  static void printAnalysisInformation(const AlignedPhyloLikelihoodSetInterface& sOAP, const std::string& infosFile, int warn = 1);
857 
861  template<class T>
862  static std::map<size_t, std::shared_ptr<T>> uniqueToSharedMap(std::map<size_t, std::unique_ptr<T>>& mu)
863  {
864  std::map<size_t, std::shared_ptr<T>> ms;
865  for (auto& it : mu)
866  {
867  std::shared_ptr<T> pt = std::move(it.second);
868  ms.emplace(it.first, pt);
869  }
870  return ms;
871  }
872 };
873 } // end of namespace bpp.
874 #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::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::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::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 void printParameters(const BranchModelInterface &model, OutputStream &out, int warn=1)
Output a SubstitutionModel description to a file.
static void checkEstimatedParameters(const ParameterList &pl)
Check if parameter values are close to their definition boundary.
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 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::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< 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::map< size_t, std::shared_ptr< T > > uniqueToSharedMap(std::map< size_t, std::unique_ptr< T >> &mu)
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 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::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 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 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 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< DiscreteDistributionInterface > > getRateDistributions(const std::map< std::string, std::string > &params, const string &suffix="", bool suffixIsOptional=true, bool verbose=true)
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::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 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 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 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 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.