bpp-phyl3 3.0.0
BppPhylogeneticsApplication.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_BPPPHYLOGENETICSAPPLICATION_H
6#define BPP_PHYL_APP_BPPPHYLOGENETICSAPPLICATION_H
7
8
9#include "../Likelihood/PhyloLikelihoods/PhyloLikelihoodContainer.h"
10#include "../Likelihood/SequenceEvolution.h"
11#include "../Likelihood/SubstitutionProcessCollection.h"
12#include "../Tree/PhyloTree.h"
13
14// From the STL:
15#include <iostream>
16#include <iomanip>
17#include <limits>
18
19using namespace std;
20
21// From bpp-seq:
23
24namespace bpp
25{
27 public virtual BppSequenceApplication
28{
29public:
30 BppPhylogeneticsApplication(int argc, char* argv[], const std::string& name) :
31 BppApplication(argc, argv, name),
32 BppSequenceApplication(argc, argv, name)
33 {}
34
35public:
46 virtual std::map<size_t, std::shared_ptr<PhyloTree>> getPhyloTreesMap(
47 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mSites,
48 std::map<std::string, std::string>& unparsedParams,
49 const std::string& prefix = "input.",
50 const std::string& suffix = "",
51 bool suffixIsOptional = true) const;
52
57 virtual std::unique_ptr<SubstitutionProcessCollection> getCollection(
58 std::shared_ptr<const Alphabet> alphabet,
59 std::shared_ptr<const GeneticCode> gCode,
60 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mSites,
61 const std::map<size_t, std::shared_ptr<PhyloTree>>& mpTree,
62 std::map<std::string, std::string>& unparsedParams,
63 const std::string& prefix = "input.",
64 const std::string& suffix = "",
65 bool suffixIsOptional = true) const;
66
67 virtual std::unique_ptr<SubstitutionProcessCollection> getCollection(
68 std::shared_ptr<const Alphabet> alphabet,
69 std::shared_ptr<const GeneticCode> gCode,
70 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mSites,
71 std::map<std::string, std::string>& unparsedParams,
72 const std::string& prefix = "input.",
73 const std::string& suffix = "",
74 bool suffixIsOptional = true) const;
75
79 virtual std::map<size_t, std::unique_ptr<SequenceEvolution>> getProcesses(
80 std::shared_ptr<SubstitutionProcessCollection> collection,
81 std::map<std::string, std::string>& unparsedParams,
82 const std::string& suffix = "",
83 bool suffixIsOptional = true) const;
84
88 virtual std::shared_ptr<PhyloLikelihoodContainer> getPhyloLikelihoods(
89 Context& context,
90 std::map<size_t, std::shared_ptr<SequenceEvolution>> mSeqEvol,
91 std::shared_ptr<SubstitutionProcessCollection> collection,
92 const std::map<size_t,
93 std::shared_ptr<const AlignmentDataInterface>>& mSites,
94 const std::string& suffix = "",
95 bool suffixIsOptional = true) const;
96
97
105 virtual void fixLikelihood(
106 std::shared_ptr<const Alphabet> alphabet,
107 std::shared_ptr<const GeneticCode> gCode,
108 std::shared_ptr<PhyloLikelihoodInterface> phylolik,
109 const std::string& suffix = "",
110 bool suffixIsOptional = true) const;
111
118 virtual void displayParameters(
119 const PhyloLikelihoodInterface& tl,
120 bool displaylL = true) const;
121};
122} // end of namespace bpp;
123#endif // BPP_PHYL_APP_BPPPHYLOGENETICSAPPLICATION_H
virtual void fixLikelihood(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, std::shared_ptr< PhyloLikelihoodInterface > phylolik, const std::string &suffix="", bool suffixIsOptional=true) const
Method to have a clean likelihood (ie not saturated, nor infinite).
virtual std::map< size_t, std::unique_ptr< SequenceEvolution > > getProcesses(std::shared_ptr< SubstitutionProcessCollection > collection, std::map< std::string, std::string > &unparsedParams, const std::string &suffix="", bool suffixIsOptional=true) const
get the substitution processes.
virtual std::map< size_t, std::shared_ptr< PhyloTree > > getPhyloTreesMap(const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mSites, std::map< std::string, std::string > &unparsedParams, const std::string &prefix="input.", const std::string &suffix="", bool suffixIsOptional=true) const
Methods to build objects.
virtual std::unique_ptr< SubstitutionProcessCollection > getCollection(std::shared_ptr< const Alphabet > alphabet, std::shared_ptr< const GeneticCode > gCode, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mSites, const std::map< size_t, std::shared_ptr< PhyloTree > > &mpTree, std::map< std::string, std::string > &unparsedParams, const std::string &prefix="input.", const std::string &suffix="", bool suffixIsOptional=true) const
get the collection of objects necessary to build substitution processes.
BppPhylogeneticsApplication(int argc, char *argv[], const std::string &name)
virtual void displayParameters(const PhyloLikelihoodInterface &tl, bool displaylL=true) const
Display parameter values.
virtual std::shared_ptr< PhyloLikelihoodContainer > getPhyloLikelihoods(Context &context, std::map< size_t, std::shared_ptr< SequenceEvolution > > mSeqEvol, std::shared_ptr< SubstitutionProcessCollection > collection, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mSites, const std::string &suffix="", bool suffixIsOptional=true) const
get the phylolikelihoods.
Context for dataflow node construction.
Definition: DataFlow.h:527
The PhyloLikelihood interface, for phylogenetic likelihood.
Defines the basic types of data flow nodes.