bpp-phyl3  3.0.0
SENCA.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_MODEL_CODON_SENCA_H
6 #define BPP_PHYL_MODEL_CODON_SENCA_H
7 
8 
12 
13 namespace bpp
14 {
47 class SENCA :
48  public virtual SubstitutionModelInterface,
52 {
53 public:
54  SENCA(
55  std::shared_ptr<const GeneticCode> gCode,
56  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
57  std::unique_ptr<FrequencySetInterface> pfit,
58  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
59 
60  SENCA(
61  std::shared_ptr<const GeneticCode> gCode,
62  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
63  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
64  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
65  std::unique_ptr<FrequencySetInterface> pfit,
66  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
67 
68  virtual ~SENCA() {}
69 
70  SENCA* clone() const override
71  {
72  return new SENCA(*this);
73  }
74 
75 public:
76  void fireParameterChanged(const ParameterList& parameterlist) override;
77 
78  std::string getName() const override
79  {
80  return "SENCA";
81  }
82 
83  double getCodonsMulRate(size_t i, size_t j) const override;
84 
85  void setNamespace(const std::string&) override;
86 
99  void setFreq(std::map<int, double>& frequencies) override;
100 
102  {
104  }
105 
106  bool hasCodonFrequencySet() const override
107  {
109  }
110 };
111 } // end of namespace bpp.
112 #endif // BPP_PHYL_MODEL_CODON_SENCA_H
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models.
Abstract class for modelling of ratios of substitution rates between codons, whatever they are synony...
const CodonFrequencySetInterface & codonFrequencySet() const override
Abstract class for substitution models on codons.
Parametrize a set of state frequencies for codons.
Class for non-synonymous and synonymous substitution models on codons with parameterized equilibrium ...
Definition: SENCA.h:52
void setNamespace(const std::string &) override
Definition: SENCA.cpp:54
bool hasCodonFrequencySet() const override
Definition: SENCA.h:106
SENCA * clone() const override
Definition: SENCA.h:70
virtual ~SENCA()
Definition: SENCA.h:68
void setFreq(std::map< int, double > &frequencies) override
set the fitness of the model from given frequencies, such that the equilibrium frequencies of the mod...
Definition: SENCA.cpp:62
double getCodonsMulRate(size_t i, size_t j) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
Definition: SENCA.cpp:48
const CodonFrequencySetInterface & codonFrequencySet() const override
Definition: SENCA.h:101
SENCA(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< NucleotideSubstitutionModelInterface > pmod, std::unique_ptr< FrequencySetInterface > pfit, std::shared_ptr< const AlphabetIndex2 > pdist=nullptr)
Definition: SENCA.cpp:10
void fireParameterChanged(const ParameterList &parameterlist) override
Definition: SENCA.cpp:40
std::string getName() const override
Get the name of the model.
Definition: SENCA.h:78
Interface for all substitution models.
Defines the basic types of data flow nodes.