5 #ifndef BPP_PHYL_MODEL_CODON_CODONSAMEAARATESUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_CODON_CODONSAMEAARATESUBSTITUTIONMODEL_H
9 #include "../FrequencySet/CodonFrequencySet.h"
10 #include "../Protein/ProteinSubstitutionModel.h"
52 std::unique_ptr<ProteinSubstitutionModelInterface>
pAAmodel_;
67 std::unique_ptr<CodonFrequencySetInterface>
pFreq_;
95 std::unique_ptr<ProteinSubstitutionModelInterface> pAAmodel,
96 std::unique_ptr<CodonSubstitutionModelInterface> pCodonModel,
97 std::unique_ptr<CodonFrequencySetInterface> pFreq,
98 std::shared_ptr<const GeneticCode> pgencode);
183 void setFreq(std::map<int, double>& frequencies)
override
void setNamespace(const std::string &prefix)
bool matchParametersValues(const ParameterList ¶meters) override
AbstractSubstitutionModel & operator=(const AbstractSubstitutionModel &model)
virtual void updateMatrices_()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
Parametrize a set of state frequencies for codons.
Class for modelling of non-synonymous rates in codon models, such that the substitution rates between...
std::shared_ptr< const GeneticCode > getGeneticCode() const override
const CodonFrequencySetInterface & codonFrequencySet() const override
void setNamespace(const std::string &prefix) override
CodonSameAARateSubstitutionModel(std::unique_ptr< ProteinSubstitutionModelInterface > pAAmodel, std::unique_ptr< CodonSubstitutionModelInterface > pCodonModel, std::unique_ptr< CodonFrequencySetInterface > pFreq, std::shared_ptr< const GeneticCode > pgencode)
Build a new CodonSameAARateSubstitutionModel object from a pointer to NucleotideSubstitutionModel.
std::unique_ptr< CodonFrequencySetInterface > pFreq_
Protein Model which will be used to get similar AA rates. Its possible parameters are not copied in t...
CodonSameAARateSubstitutionModel(const CodonSameAARateSubstitutionModel &model)
CodonSameAARateSubstitutionModel & operator=(const CodonSameAARateSubstitutionModel &model)
std::unique_ptr< CodonSubstitutionModelInterface > pCodonModel_
Codon Model which will be copied. Its possible parameters are not copied in this object.
std::shared_ptr< const GeneticCode > pgencode_
void setFreq(std::map< int, double > &frequencies) override
Set equilibrium frequencies.
const ProteinSubstitutionModelInterface & proteinModel() const
const CodonSubstitutionModelInterface & codonModel() const
std::string getName() const override
Get the name of the model.
RowMatrix< double > X_
20 x 20 Matrix of the denominator of the multiplicators
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...
virtual ~CodonSameAARateSubstitutionModel()
std::unique_ptr< ProteinSubstitutionModelInterface > pAAmodel_
Protein Model which will be used to get similar AA rates.
CodonSameAARateSubstitutionModel * clone() const override
Vdouble phi_
20 Vdouble for computation
bool hasCodonFrequencySet() const override
void fireParameterChanged(const ParameterList ¶meters) override
Tells the model that a parameter value has changed.
Interface for codon models.
virtual void setFreq(std::map< int, double > &frequencies)=0
Specialized interface for protein substitution model.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble