bpp-phyl3 3.0.0
DFP07.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_DFP07_H
6#define BPP_PHYL_MODEL_CODON_DFP07_H
7
9
10#include "../AbstractBiblioMixedTransitionModel.h"
11#include "../FrequencySet/CodonFrequencySet.h"
12#include "../MixtureOfASubstitutionModel.h"
13#include "../Protein/ProteinSubstitutionModel.h"
15
16namespace bpp
17{
49class DFP07 :
51{
52protected:
57
63
64public:
65 DFP07(
66 std::shared_ptr<const GeneticCode> gCode,
67 std::unique_ptr<ProteinSubstitutionModelInterface> pAAmodel,
68 std::unique_ptr<CodonFrequencySetInterface> codonFreqs);
69
70 DFP07(const DFP07& mod2) :
77 mixedSubModelPtr_(nullptr),
78 synfrom_(mod2.synfrom_),
79 synto_(mod2.synto_)
80 {
82 }
83
84 virtual DFP07* clone() const override
85 {
86 return new DFP07(*this);
87 }
88
89 DFP07& operator=(const DFP07& mod2)
90 {
92
93 synfrom_ = mod2.synfrom_;
94 synto_ = mod2.synto_;
95
96 mixedSubModelPtr_ = dynamic_cast<const MixtureOfASubstitutionModel*>(&eq.mixedModel());
97
98 return *this;
99 }
100
102 {
103 return dynamic_cast<const CodonSameAARateSubstitutionModel&>(nModel(0)).proteinModel();
104 }
105
106 std::string getName() const override { return "DFP07"; }
107
108protected:
109 void updateMatrices_() override;
110};
111} // end of namespace bpp.
112#endif // BPP_PHYL_MODEL_CODON_DFP07_H
Abstract class for mixture models based on the bibliography.
AbstractBiblioMixedTransitionModel & operator=(const AbstractBiblioMixedTransitionModel &model)
const MixedTransitionModelInterface & mixedModel() const
const TransitionModelInterface & nModel(size_t i) const override
Returns the submodel from the mixture.
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
Abstract class of Wrapping model class, where all methods are redirected from model().
Class for modelling of non-synonymous rates in codon models, such that the substitution rates between...
Class for non-synonymous substitution models on codons with parameterized equilibrium frequencies and...
Definition: DFP07.h:51
size_t synto_
Definition: DFP07.h:62
void updateMatrices_() override
Definition: DFP07.cpp:99
DFP07(const DFP07 &mod2)
Definition: DFP07.h:70
DFP07 & operator=(const DFP07 &mod2)
Definition: DFP07.h:89
const MixtureOfASubstitutionModel * mixedSubModelPtr_
Definition: DFP07.h:56
virtual DFP07 * clone() const override
Definition: DFP07.h:84
const ProteinSubstitutionModelInterface & proteinModel() const
Definition: DFP07.h:101
std::string getName() const override
Get the name of the model.
Definition: DFP07.h:106
size_t synfrom_
indexes of 2 codons states between which the substitution is synonymous, to set a basis to the homoge...
Definition: DFP07.h:62
DFP07(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< ProteinSubstitutionModelInterface > pAAmodel, std::unique_ptr< CodonFrequencySetInterface > codonFreqs)
Definition: DFP07.cpp:17
Specialized interface for protein substitution model.
Defines the basic types of data flow nodes.